- From: Nikos Andronikos via GitHub <sysbot+gh@w3.org>
- Date: Thu, 24 Nov 2016 10:14:42 +0000
- To: public-svg-issues@w3.org
> My guess is part of the problem is that there are two coordinate systems for patterns: the pattern tile (patternUnits) versus the pattern contents (patternContentUnits). So it's not really clear what should happen, according to spec, if the two unit types don't match each other, or if there is a viewBox on the pattern. I personally would expect the transform to apply to each composited pattern tile, in the units used to define the pattern tile dimensions. But that's not exactly spelled out in the spec. It would be nice if the spec listed out all the transforms and the order they are applied in. The language in that section isn't very consistent. In some places it says transforms are 'post multiplied', in others it says 'applied on top' This is how I've always thought of it (but disclaimer that I've never tested my understanding to this degree): A conceptual pattern is created, which contains the geometry that exists in the rectangle defined by patternContentUnits or the viewBox, tiled to infinity. Note: patternContentUnits is just a shorthand for two possible commonly used viewBox values) Then that pattern is rendered onto the svg canvas, clipped by the the filled element. The following transforms, listed in the spec, are applied to the pattern during rendering U: user space A: patternUnits* C: patternTransform F: final transformation matrix applied to the tile the order of operations should be: F = UABC *userSpaceOnUse simply results in an identity matrix here. My proposal is to leave the spec as is for now, but clarify in this issue what the behaviour should be. We need to create some tests covering this behaviour, then file bugs on the browsers and see if there is interest in fixing them. If there is, we tidy up the spec language, otherwise we spec what the browsers do as best we can. -- GitHub Notification of comment by nikosandronikos Please view or discuss this issue at https://github.com/w3c/svgwg/issues/293#issuecomment-262739551 using your GitHub account
Received on Thursday, 24 November 2016 10:14:48 UTC