xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Using container elements in clippings
Date Tue, 06 Apr 2010 09:54:21 GMT
Hi Mariano,

Mariano Kamp <mariano.kamp@gmail.com> wrote on 04/06/2010 04:47:01 AM:

> As there are more than one shape used in a graphic I cannot use a 
> new gradient over and over again, but I would like to use a single 
> gradient that fills the whole icon, but only shines through where 
> there are holes in a mask I would apply. I thought the 
> implementation would be easy: Just take the shapes and containers I 
> have and wrap them in a clipPath element. 

   I suggest you look at the 'mask' element:

   It will be much better for what you want to do.  Most
importantly it has anti-aliased edges which clip-path 
generally doesn't (although Batik will render anti-aliased
clip-paths if you set shape-rendering to geometricPrecision
on the clip-path element).

> One minor thing is that the line shape doesn't seem to work.

    Right, Clip uses the raw geometry not the stroked geometry,
there isn't much to a line w/o stroking.

> But the other ? more serious ? issue is that containers don't seem 
> to be allowed as children of clipPath which does seem like a game-
> over obstacle. 

    Right you a clip-path can't have groups and stuff, just 
geometry elements, of course you are allowed to have a 'use'
element and that can have complex children.

> On a sidebar. Just to state the obvious: I am fairly inexperienced 
> with SVG. So if you see something which you'd consider obvious, 
> please let me know and don't think I would see that too ;)

   It's worth browsing the SVG standard just to see what tools
are available.  I imagine if you knew there was a mask element
you would have tried it.

Thomas DeWeese | CDG Advanced Development | 
Eastman Kodak Company | 343 State Street | Rochester, NY 14650-0128 | 
Thomas.DeWeese@Kodak.com | 585 724-0294 | 

View raw message