|
@@ -164,18 +164,9 @@ public class VectorPathOverlay : Overlay
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- using Font font = Font.CreateDefault();
|
|
|
|
- font.FontSize = 24 / ZoomScale;
|
|
|
|
-
|
|
|
|
- using Paint paint = new Paint();
|
|
|
|
- paint.Color = Colors.White;
|
|
|
|
-
|
|
|
|
anchorHandles[globalAnchor].Position = new VecD(verbPointPos.X, verbPointPos.Y);
|
|
anchorHandles[globalAnchor].Position = new VecD(verbPointPos.X, verbPointPos.Y);
|
|
anchorHandles[globalAnchor].Draw(context);
|
|
anchorHandles[globalAnchor].Draw(context);
|
|
|
|
|
|
- context.DrawText($"i: {globalAnchor}, sub: {subPath}", new VecD(verbPointPos.X, verbPointPos.Y), font,
|
|
|
|
- paint);
|
|
|
|
-
|
|
|
|
globalAnchor++;
|
|
globalAnchor++;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -287,9 +278,9 @@ public class VectorPathOverlay : Overlay
|
|
if (data.verb == PathVerb.Close)
|
|
if (data.verb == PathVerb.Close)
|
|
{
|
|
{
|
|
subPath++;
|
|
subPath++;
|
|
- startingIndexInSubPath = anchorIndex;
|
|
|
|
- lastAnchorIndexInSubPath = CountAnchorsInSubPath(Path, subPath) - 1;
|
|
|
|
anchorIndex--;
|
|
anchorIndex--;
|
|
|
|
+ startingIndexInSubPath = anchorIndex;
|
|
|
|
+ lastAnchorIndexInSubPath = CountAnchorsInSubPath(Path, subPath) - 1 + startingIndexInSubPath;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -393,7 +384,6 @@ public class VectorPathOverlay : Overlay
|
|
anchor.OnDrag += OnHandleDrag;
|
|
anchor.OnDrag += OnHandleDrag;
|
|
anchor.OnRelease += OnHandleRelease;
|
|
anchor.OnRelease += OnHandleRelease;
|
|
anchor.OnTap += OnHandleTap;
|
|
anchor.OnTap += OnHandleTap;
|
|
- anchor.DebugName = $"{atIndex}";
|
|
|
|
AddHandle(anchor);
|
|
AddHandle(anchor);
|
|
SnappingController.AddXYAxis($"editingPath[{atIndex}]", () => anchor.Position);
|
|
SnappingController.AddXYAxis($"editingPath[{atIndex}]", () => anchor.Position);
|
|
}
|
|
}
|
|
@@ -523,7 +513,6 @@ public class VectorPathOverlay : Overlay
|
|
{
|
|
{
|
|
if (data.verb == PathVerb.Close)
|
|
if (data.verb == PathVerb.Close)
|
|
{
|
|
{
|
|
- anchor--;
|
|
|
|
DefaultPathVerb(data, newPath);
|
|
DefaultPathVerb(data, newPath);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -573,7 +562,10 @@ public class VectorPathOverlay : Overlay
|
|
return subPath;
|
|
return subPath;
|
|
}
|
|
}
|
|
|
|
|
|
- anchor++;
|
|
|
|
|
|
+ if (data.verb != PathVerb.Move)
|
|
|
|
+ {
|
|
|
|
+ anchor++;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -588,7 +580,8 @@ public class VectorPathOverlay : Overlay
|
|
}
|
|
}
|
|
|
|
|
|
var index = anchorHandles.IndexOf(handle);
|
|
var index = anchorHandles.IndexOf(handle);
|
|
- VectorPath newPath = new VectorPath();
|
|
|
|
|
|
+ VectorPath newPath = new VectorPath(Path);
|
|
|
|
+ newPath.Reset();
|
|
|
|
|
|
bool pointHandled = false;
|
|
bool pointHandled = false;
|
|
int i = 0;
|
|
int i = 0;
|