xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mariano Kamp <mariano.k...@gmail.com>
Subject Using container elements in clippings
Date Tue, 06 Apr 2010 08:47:01 GMT

I generate svg/png icons for an Android app. Those icons (see attached
example) look somewhat flat according to the UI guidelines
but should have a little bit of structure. One vehicle for that is a
background gradient.

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.

Alas this doesn't seem to work.

One minor thing is that the line shape doesn't seem to work. I think I could
work around that by using rectangles in its place.
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.

Here is a simplified example: http://pastebin.com/cTJAYdxf

Are those obstacles real or imaginary? In the former case, is there another
way to do what I want? Can I use a filter to apply a gradient over the whole
image's background? I thought about doing this with a light effect, but then
I couldn't specify the exact RGB values that the UI guidelines specify.

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 ;)


View raw message