Fix path parser spec conformance

https://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands
The "moveto" commands (M or m) must establish a new initial point
 and a new current point.
This commit is contained in:
Mikael Sand
2018-10-24 00:03:02 +03:00
parent 377a59351b
commit 9affd59b00
2 changed files with 4 additions and 4 deletions
@@ -399,8 +399,8 @@ class PropHelper {
}
private void moveTo(float x, float y) {
mPivotX = mPenX = x;
mPivotY = mPenY = y;
mPenDownX = mPivotX = mPenX = x;
mPenDownY = mPivotY = mPenY = y;
mPath.moveTo(x * mScale, y * mScale);
mLastStartPoint = getPointMap(x ,y);
+2 -2
View File
@@ -144,8 +144,8 @@
- (void)moveTo:(CGMutablePathRef)path x:(float)x y:(float)y
{
_pivotX = _penX = x;
_pivotY = _penY = y;
_penDownX = _pivotX = _penX = x;
_penDownY = _pivotY = _penY = y;
CGPathMoveToPoint(path, nil, x, y);
}