Spliting edges to add points

This commit is contained in:
Jindra Petřík
2022-12-30 16:31:07 +01:00
parent b79174fa5c
commit 06362d4cb1
6 changed files with 639 additions and 37 deletions

View File

@@ -16,6 +16,8 @@
*/
package com.jpexs.decompiler.flash.gui;
import java.awt.geom.Point2D;
/**
*
* @author JPEXS
@@ -25,6 +27,14 @@ public class DisplayPoint {
public int y;
public boolean onPath;
public DisplayPoint(Point2D point) {
this(point, true);
}
public DisplayPoint(Point2D point, boolean onPath) {
x = (int)Math.round(point.getX());
y = (int)Math.round(point.getY());
this.onPath = onPath;
}
public DisplayPoint(DisplayPoint src) {
this(src.x, src.y, src.onPath);
}
@@ -43,4 +53,7 @@ public class DisplayPoint {
return "["+x+","+y+"]";
}
public Point2D toPoint2D(){
return new Point2D.Double(x, y);
}
}