Class BitmapShape
- java.lang.Object
-
- io.github.applecommander.bastools.api.shapes.BitmapShape
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBitmapShape.EuclidianDistanceVectorizationEncode a bitmap shape by using the Euclidean distance between plotted points to determine which vectors take precedence.static classBitmapShape.SweepVectorizationEncode a bitmap shape by going to a corner and sweeping back-and-forth across the image.
-
Constructor Summary
Constructors Constructor Description BitmapShape()BitmapShape(int height, int width)BitmapShape(int height, int width, java.lang.String label)BitmapShape(java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddColumn()voidaddRow()voidappendBitmapRow(java.lang.String line)java.lang.Booleanget(int x, int y)java.lang.Booleanget(java.awt.Point point)intgetHeight()java.lang.StringgetLabel()Get the label of this shape.intgetWidth()voidinsertColumn()voidinsertRow()booleanisEmpty()Indicates if this shape is empty.voidplot(int x, int y)voidplot(int x, int y, java.lang.Boolean pixel)BitmapShapetoBitmap()Transform to a BitmapShape.VectorShapetoVector()Convert this bitmap shape to a vector shape.
-
-
-
Method Detail
-
insertColumn
public void insertColumn()
-
addColumn
public void addColumn()
-
insertRow
public void insertRow()
-
addRow
public void addRow()
-
appendBitmapRow
public void appendBitmapRow(java.lang.String line)
-
getHeight
public int getHeight()
-
getWidth
public int getWidth()
-
plot
public void plot(int x, int y)
-
plot
public void plot(int x, int y, java.lang.Boolean pixel)
-
get
public java.lang.Boolean get(int x, int y)
-
get
public java.lang.Boolean get(java.awt.Point point)
-
isEmpty
public boolean isEmpty()
Description copied from interface:ShapeIndicates if this shape is empty.
-
getLabel
public java.lang.String getLabel()
Description copied from interface:ShapeGet the label of this shape.
-
toBitmap
public BitmapShape toBitmap()
Description copied from interface:ShapeTransform to a BitmapShape.
-
toVector
public VectorShape toVector()
Convert this bitmap shape to a vector shape. The shape chosen encodes to the least number of bytes in the resulting file.
-
-