Class ShapePoint
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Float
org.stathissideris.ascii2image.graphics.ShapePoint
- All Implemented Interfaces:
Serializable,Cloneable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float -
Field Summary
FieldsFields inherited from class java.awt.geom.Point2D.Float
x, y -
Constructor Summary
ConstructorsConstructorDescriptionShapePoint(float x, float y) ShapePoint(float x, float y, int type) ShapePoint(ShapePoint other) -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(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) toString()Methods inherited from class java.awt.geom.Point2D.Float
getX, getY, setLocation, setLocationMethods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
-
Field Details
-
TYPE_NORMAL
public static final int TYPE_NORMAL- See Also:
-
TYPE_ROUND
public static final int TYPE_ROUND- See Also:
-
-
Constructor Details
-
ShapePoint
public ShapePoint() -
ShapePoint
public ShapePoint(float x, float y) -
ShapePoint
public ShapePoint(float x, float y, int type) -
ShapePoint
-
-
Method Details
-
getType
public int getType()- Returns:
-
setType
public void setType(int i) - Parameters:
i-
-
isInLineWith
-
isWithinEdge
-
isNorthOf
-
isSouthOf
-
isWestOf
-
isEastOf
-
toString
- Overrides:
toStringin classPoint2D.Float
-
assign
-
moveTo
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-
-