-
Notifications
You must be signed in to change notification settings - Fork 710
[css-transforms-1] User coordinate space statement breaks SVG #893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@AmeliaBR, I wonder if you might have mis-read this paragraph in the spec: In particular the patternUnits, gradientUnits and maskUnits attributes don’t affect the user coordinate system used for transformations [SVG11]. |
@dirkschulze to figure something out |
On re-examination, I suspect the paragraph was trying to distinguish between For masks, it might make sense to only transform the mask contents, not the extent rectangle. But for patterns, you want to transform both the pattern tiles and the pattern contents. That is what implementations currently do, and a pattern transform would be fairly useless otherwise. However, implementations are not interoperable in some of the other details of patternTransform, like defining where the origin is and how the transformations interact with a |
Ok, looked at this again. Lets limit the issue in question to the The
As a result, according to the current specification text, @AmeliaBR Do you think this is a breaking change? Do you have an example? |
I think my previous statement is incorrect in a way and so is the following spec text:
patternUnits, gradientUnits and maskUnits clearly state that the transform gets applied after the coordinate transformation by those attributes. So, the transforms apply in the pattern space, gradient space or mask space. Only for I’ll change the spec text to reflect that and simply link to the *units attributes that would define the mapping of pattern space an co. |
… on pattern, gradient and clipPath elements. #893
http://www.w3.org/mid/CAFDDJ7yhF7Qn28wVMqb7ra6N9Q=j74OTqHWpjLeYrH=LQwmd4A@mail.gmail.com
In the CSS transforms module, the section "User Coordinate space" has the
following statement:
In particular the patternUnits
Links:
http://www.w3.org/TR/2013/WD-css-transforms-1-20131126/#svg-user-coordinate-space
http://dev.w3.org/csswg/css-transforms-1/#svg-user-coordinate-space
Although the draft spec references SVG 1.1, this would be a breaking
change from current SVG behavior. The SVG definition used for
gradientTransform and patternTransform is as follows:
This additional transformation matrix is post-multiplied to (i.e.,
Links:
http://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementGradientTransformAttribute
http://www.w3.org/TR/SVG11/pservers.html#PatternElementPatternTransformAttribute
Unless there is an overwhelming reason to change this, I would recommend
that the CSS transforms text be updated to state the transformation applies
in the user coordinate system in effect for the element's contents,*
including* any implicit transformations created by patternUnits,
gradientUnits, or maskUnits.
The text was updated successfully, but these errors were encountered: