[SVG] Fix application of skewX/skewY attributes
The SkMatrix setSkew functions set the matrix value directly, so we need to treat the angle according to https://www.w3.org/TR/SVG11/coords.html#SkewXDefined Change-Id: I3a47e4e98724ef71f39a00dc2f07c8bf430de747 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282268 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Tyler Denniston <tdenniston@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org> Auto-Submit: Tyler Denniston <tdenniston@google.com>
This commit is contained in:
parent
d2c24c8aad
commit
d1e5b030fd
@ -373,7 +373,7 @@ bool SkSVGAttributeParser::parseSkewXToken(SkMatrix* matrix) {
|
||||
if (!this->parseScalarToken(&angle)) {
|
||||
return false;
|
||||
}
|
||||
m->setSkewX(angle);
|
||||
m->setSkewX(tanf(SkDegreesToRadians(angle)));
|
||||
return true;
|
||||
}, matrix);
|
||||
}
|
||||
@ -384,7 +384,7 @@ bool SkSVGAttributeParser::parseSkewYToken(SkMatrix* matrix) {
|
||||
if (!this->parseScalarToken(&angle)) {
|
||||
return false;
|
||||
}
|
||||
m->setSkewY(angle);
|
||||
m->setSkewY(tanf(SkDegreesToRadians(angle)));
|
||||
return true;
|
||||
}, matrix);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user