pattern and rendering order

Hello www-svg,

trying to use SVG1.1 pattern I found an interesting question
for the situation with overflow="visible". I think, this is not
really specified in the current specification, however the
problem can be solved as discussed below.
And if this is clarified, maybe there is a chance, that some
viewers support this interesting feature correctly and with
a proper quality, because it turned out in my tests, that
even in simple situations the results from viewers are
typically disappointing or not usable due to a low quality
of presentation.
In many or most viewers pattern are ignored, wrong or of low
quality or overflow="visible" is ignored. Low quality looks often
like enlarged raster images with inaccurate positioning
(see for example the adobe plugin or Opera; with the adobe 
plugin there are often ugly residual frames from clipping too).

For example Squiggle/Batik uses a method that one copy overlaps
another - topmost is bottom right, however, this is not specified and
often not very useful and maybe not intended.


Question:
What is the correct rendering order for pattern fragments coming from
different copies, if they are overlapping due to overflow="visible"?


There are two different situations:
a) a shape from one copy overlaps with another shape of another copy
b) two copies of the same shape overlap with each other.

To get some meaningful result,
in case a) simply the painters model 
can be applied, this means the shape noted
later in the source code
(in the pattern element) is on top, no matter, which copy.

For case b) there is no proper rule. But there could be a useful solution,
if something like a super-pattern-path is created for each shape within the
pattern, where each copy creates a subpath of the super-path of each
shape of the pattern. In this situation no copy has to be on top and there
is no conflict with the painters model.


Best wishes

Olaf



Attached is a sample.
Top left are the shapes used in the pattern, the green stroked rectangle
represents the viewBox, the large area is filled with the (transformed)
pattern.

Received on Wednesday, 22 April 2009 13:57:36 UTC