You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by sl...@e-sim.co.il on 2001/09/20 17:11:48 UTC

fill property



Hi,

Can anyone tell me whether I can specify an image file as the fill property of a
stylable SVG element?
If the answer is yes, can you please give me an example of how to do this.

Thank you,
Silvana



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: fill property

Posted by Vincent Hardy <vi...@sun.com>.
Silvana,

You can, but indirectly, through a <pattern>. Something like:

<defs>
	<pattern id="myPattern" x="0" y="0" width="300" height="300">
		<image xlink:href="myImage.png" width="300" height="300" />
	</pattern>
</defs>

        <circle r="300" cx="150" cy="150" fill="url(#myPattern)" />

You can look into the samples/tests/ directory where there are 
several pattern examples.

Good luck with your project!
Vincent.

slorentz@e-sim.co.il wrote:
> 
> Hi,
> 
> Can anyone tell me whether I can specify an image file as the fill property of a
> stylable SVG element?
> If the answer is yes, can you please give me an example of how to do this.
> 
> Thank you,
> Silvana
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org