Class BitmapShape.SweepVectorization
java.lang.Object
io.github.applecommander.bastools.api.shapes.BitmapShape.SweepVectorization
- All Implemented Interfaces:
Supplier<VectorShape>
- Enclosing class:
BitmapShape
Encode a bitmap shape by going to a corner and sweeping back-and-forth across the image.
The resulting shape is not optimal, so the
VectorShape.optimize() should be used.
Note that this class is setup to be dynamic in the chosen corner.-
Constructor Summary
ConstructorsConstructorDescriptionSweepVectorization(BitmapShape bitmapShape, VectorCommand initialMovement, VectorCommand next) Create an instance of the sweep method. -
Method Summary
Modifier and TypeMethodDescriptionvoidget()booleanonOrAtEdge(VectorCommand vector) voidplotOrMove(VectorCommand vector) voidscanRow()
-
Constructor Details
-
SweepVectorization
public SweepVectorization(BitmapShape bitmapShape, VectorCommand initialMovement, VectorCommand next) Create an instance of the sweep method.- Parameters:
bitmapShape- is the shape to be convertedinitialMovement- is the initial sweep movementnext- is the direction to advance for each line
-
-
Method Details
-
get
- Specified by:
getin interfaceSupplier<VectorShape>
-
findStartPosition
public void findStartPosition() -
scanRow
public void scanRow() -
plotOrMove
-
onOrAtEdge
-