Re: Patterns and Clipping (Adobe SVG Plug-In and Batik)

Thanks for your comments.



>     This is due to an error in the SVG.  In looking at the SVG it
>appears that the pattern consists of a yellow triangle with a pink
>triangle drawn inside of it.  In reality the pattern is a yellow
>triangle with a slightly smaller pink triangle drawn one pattern tile
>height below the yellow triangle (see attached PNG).

I intentionally placed the triangles apart in this manner; that was 
not an error.

It seems we have a differing interpretation of what an SVG pattern 
is. We seem to place the iteration at different levels. I was 
thinking that all of the yellow triangles would be drawn and then all 
of the pink ones would be drawn. (This way, rendering order does not 
play a role between different elements and the 'depth' ordering 
between elements is preserved.) As was discussed earlier, there also 
seems to be a common assumption about the rendering order that I 
wasn't aware of as well. It seems that the SVG document should 
include some clarifying text about patterns.

I did try the file again, with the pink triangle placed 'above' 
(lesser y value than) the yellow and got the result I expected. So it 
seems that I can generate patterns as long as, each time I add an 
element, I ensure that the y value decreases sufficiently.

It does seem a bit funny to me that "tess1.gif" generates a pattern 
with pink triangles above yellow triangles, while "tess2.gif" 
generates a pattern with the triangles interleaved. (Moving the pink 
triangle down one more unit would have the pink triangles beneath the 
yellow ones in the pattern, even though their ordering is revered in 
the pattern element.)




>Hope this helped.

It has certainly helped make your assumptions clear. I can modify the 
files so that they are displayed correctly under renderers based on 
these assumptions, so it has helped :-) But perhaps developers whose 
first language is written right to left would have different 
assumptions.




Jeff
-- 

Received on Wednesday, 7 November 2001 13:19:36 UTC