Class ShapePoint
- java.lang.Object
-
- java.awt.geom.Point2D
-
- java.awt.geom.Point2D.Float
-
- org.stathissideris.ascii2image.graphics.ShapePoint
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class ShapePoint extends java.awt.geom.Point2D.Float- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intTYPE_NORMALstatic intTYPE_ROUND
-
Constructor Summary
Constructors Constructor Description ShapePoint()ShapePoint(float x, float y)ShapePoint(float x, float y, int type)ShapePoint(ShapePoint other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(ShapePoint point)intgetType()booleanisEastOf(ShapePoint point)booleanisInLineWith(ShapePoint point)booleanisLocked()booleanisNorthOf(ShapePoint point)booleanisSouthOf(ShapePoint point)booleanisWestOf(ShapePoint point)booleanisWithinEdge(ShapeEdge edge)voidmoveTo(ShapePoint point)Does the same as assign, but respects the locked attributevoidsetLocked(boolean b)voidsetType(int i)java.lang.StringtoString()
-
-
-
Field Detail
-
TYPE_NORMAL
public static final int TYPE_NORMAL
- See Also:
- Constant Field Values
-
TYPE_ROUND
public static final int TYPE_ROUND
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ShapePoint
public ShapePoint()
-
ShapePoint
public ShapePoint(float x, float y)
-
ShapePoint
public ShapePoint(float x, float y, int type)
-
ShapePoint
public ShapePoint(ShapePoint other)
-
-
Method Detail
-
getType
public int getType()
- Returns:
-
setType
public void setType(int i)
- Parameters:
i-
-
isInLineWith
public boolean isInLineWith(ShapePoint point)
-
isWithinEdge
public boolean isWithinEdge(ShapeEdge edge)
-
isNorthOf
public boolean isNorthOf(ShapePoint point)
-
isSouthOf
public boolean isSouthOf(ShapePoint point)
-
isWestOf
public boolean isWestOf(ShapePoint point)
-
isEastOf
public boolean isEastOf(ShapePoint point)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.awt.geom.Point2D.Float
-
assign
public void assign(ShapePoint point)
-
moveTo
public void moveTo(ShapePoint point)
Does the same as assign, but respects the locked attribute- Parameters:
point-
-
isLocked
public boolean isLocked()
- Returns:
-
setLocked
public void setLocked(boolean b)
- Parameters:
b-
-
-