Class PathElement2i.ClosePathElement2i
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.i.PathElement2i
-
- org.arakhne.afc.math.geometry.d2.i.PathElement2i.ClosePathElement2i
-
- All Implemented Interfaces:
Serializable,Cloneable,PathElement2ai,PathElement2D
- Enclosing class:
- PathElement2i
static class PathElement2i.ClosePathElement2i extends PathElement2i
An element of the path that represents aCLOSE.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.arakhne.afc.math.geometry.d2.i.PathElement2i
PathElement2i.ArcPathElement2i, PathElement2i.ClosePathElement2i, PathElement2i.CurvePathElement2i, PathElement2i.LinePathElement2i, PathElement2i.MovePathElement2i, PathElement2i.QuadPathElement2i
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d2.i.PathElement2i
toX, toY, type
-
-
Constructor Summary
Constructors Constructor Description ClosePathElement2i(int fromx, int fromy, int tox, int toy)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetFromX()Replies the x coordinate of the starting point.intgetFromY()Replies the y coordinate of the starting point.inthashCode()booleanisDrawable()Replies if the element is not empty and is drawable.booleanisEmpty()Replies if the element is empty, ie. the points are the same.int[]toArray()Copy the coords into an array, except the source point.voidtoArray(double[] array)Copy the coords into the given array, except the source point.voidtoArray(int[] array)Copy the coords into the given array, except the source point.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.i.PathElement2i
getCtrlX1, getCtrlX2, getCtrlY1, getCtrlY2, getLargeArcFlag, getRadiusX, getRadiusY, getRotationX, getSweepFlag, getToX, getToY, getType, toString
-
-
-
-
Method Detail
-
equals
@Pure public boolean equals(Object obj)
- Specified by:
equalsin classPathElement2i
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classPathElement2i
-
isEmpty
@Pure public boolean isEmpty()
Description copied from interface:PathElement2DReplies if the element is empty, ie. the points are the same.- Returns:
trueif the points are the same; otherwisefalse.
-
isDrawable
@Pure public boolean isDrawable()
Description copied from interface:PathElement2DReplies if the element is not empty and is drawable.Only the path elements that may produce pixels on the screen must reply
truein this function.- Returns:
trueif the path element is drawable; otherwisefalse.
-
toArray
public void toArray(int[] array)
Description copied from interface:PathElement2aiCopy the coords into the given array, except the source point.- Parameters:
array- the output array.
-
toArray
public void toArray(double[] array)
Description copied from interface:PathElement2aiCopy the coords into the given array, except the source point.- Parameters:
array- the output array.
-
toArray
@Pure public int[] toArray()
Description copied from class:PathElement2iCopy the coords into an array, except the source point.- Specified by:
toArrayin classPathElement2i- Returns:
- the array of the points, except the source point.
-
getFromX
public int getFromX()
Description copied from interface:PathElement2aiReplies the x coordinate of the starting point.- Returns:
- the x coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO.
-
getFromY
public int getFromY()
Description copied from interface:PathElement2aiReplies the y coordinate of the starting point.- Returns:
- the y coordinate, or
Double.NaNif the type isPathElementType.MOVE_TO.
-
-