setTransform(transform)Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.
When the setTransform() method is invoked on the pattern, the user agent must replace the pattern's transformation matrix with the one described by the SVGMatrix object provided as an argument to the method.
Requesting approval to ship?No
var svg = document.getElementById("svg1");var mtx = svg1.createSVGMatrix();pat.setTransform(mtx.rotate(-45).scale(0.1));
lgtm. I think this is a sane idea.
What do you plan to do if the passed matrix is singular? In other cases we silently return earlier and the method does nothing (like addPath). It is not specified in the WHATWG spec, but browsers across the board agreed on this behavior for addPath. I think it makes sense to do it for patterns as well.
On Sep 4, 2014, at 8:42 AM, pav...@samsung.com wrote:
> Contact emails
> pav...@samsung.com, vive...@samsung.com
>
> Spec
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvaspattern-settransform
>
> Summary
> pattern . setTransform(transform)
> Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.
>
> When the setTransform() method is invoked on the pattern, the user agent must replace the pattern's transformation matrix with the one described by the SVGMatrix object provided as an argument to the method.
>
>
> Compatibility Risk
> Low.
>
> Ongoing technical constraints
> None.
>
> Will this feature be supported on all five Blink platforms?
> Yes.
>
> OWP launch tracking bug?
> http://code.google.com/p/chromium/issues/detail?id=289572
>
> Link to entry on the feature dashboard
> http://www.chromestatus.com/features/5100084685438976
>
> Requesting approval to ship?
> No
>
> - Pavan
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.