Trying to create a visual graphic with two images, one representing an empty state and the other a filled state.
The challenge is determining how to adjust the width of only one image while keeping them the same height using a clip path.
For example, I want to change the red image's width from 100% to 80%. Here's a fiddle showcasing both images at 100%:
Code:
<svg height="100%" width="100%">
<image xlink:href="http://www.cebbra44.com/images/barra_verde.jpg" x="0" y="0" width="100%" height="100%"/>
<image xlink:href="http://www.construtorafgs.com.br/img/bgs/barra_porcentagem_vermelha.png" x="0" y="0" width="100%" height="100%"/>
<defs>
<clipPath id="theSVGPath">
<rect x="0" y="0" width="100%" height="100%"/>
</clipPath>
</defs>
</svg>
Looking for suggestions on how to achieve this. Thank you!
Note: Changing the width of one image independently is not an option due to the use of the clip path.