Class RoundRectangle2dfx
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.dfx.AbstractShape2dfx<IT>
-
- org.arakhne.afc.math.geometry.d2.dfx.AbstractRectangularShape2dfx<RoundRectangle2dfx>
-
- org.arakhne.afc.math.geometry.d2.dfx.RoundRectangle2dfx
-
- All Implemented Interfaces:
Serializable
,Cloneable
,RectangularShape2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
,RoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
,Shape2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
,Shape2dfx<RoundRectangle2dfx>
,Shape2D<Shape2dfx<?>,RoundRectangle2dfx,PathIterator2afp<PathElement2dfx>,Point2dfx,Vector2dfx,Rectangle2dfx>
,JsonableObject
public class RoundRectangle2dfx extends AbstractRectangularShape2dfx<RoundRectangle2dfx> implements RoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
Round rectangle with 2 double precision floating-point FX properties.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:49
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.afp.RoundRectangle2afp
RoundRectangle2afp.AbstractRoundRectanglePathIterator<T extends PathElement2afp>, RoundRectangle2afp.RoundRectanglePathIterator<T extends PathElement2afp>, RoundRectangle2afp.TransformedRoundRectanglePathIterator<T extends PathElement2afp>
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d2.dfx.AbstractRectangularShape2dfx
height, maxX, maxY, minX, minY, width
-
Fields inherited from class org.arakhne.afc.math.geometry.d2.dfx.AbstractShape2dfx
boundingBox
-
-
Constructor Summary
Constructors Constructor Description RoundRectangle2dfx()
Construct an empty round rectangle.RoundRectangle2dfx(double x, double y, double width, double height, double arcWidth, double arcHeight)
Construct a round rectangle.RoundRectangle2dfx(RectangularShape2afp<?,?,?,?,?,?> shape)
Constructor by copy.RoundRectangle2dfx(RoundRectangle2afp<?,?,?,?,?,?> shape)
Constructor by copy.RoundRectangle2dfx(Point2D<?,?> min, Point2D<?,?> max, double arcWidth, double arcHeight)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.DoubleProperty
arcHeightProperty()
Replies the property for the arc height.javafx.beans.property.DoubleProperty
arcWidthProperty()
Replies the property for the arc width.RoundRectangle2dfx
clone()
Clone this shape.double
getArcHeight()
Gets the height of the arc that rounds off the corners.double
getArcWidth()
Gets the width of the arc that rounds off the corners.int
hashCode()
void
setArcHeight(double arcHeight)
Set the height of the arc that rounds off the corners.void
setArcWidth(double arcWidth)
Set the width of the arc that rounds off the corners.void
setFromCorners(double x1, double y1, double x2, double y2)
Change the frame of the rectangle conserving previous min and max if needed.void
setFromCorners(double x1, double y1, double x2, double y2, double arcWidth, double arcHeight)
Change the frame of the rectangle.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.dfx.AbstractRectangularShape2dfx
boundingBoxProperty, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, heightProperty, maxXProperty, maxYProperty, minXProperty, minYProperty, setMaxX, setMaxY, setMinX, setMinY, widthProperty
-
Methods inherited from class org.arakhne.afc.math.geometry.d2.dfx.AbstractShape2dfx
equals, getGeomFactory, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.RectangularShape2afp
clear, getCenter, getCenterX, getCenterY, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, inflate, isEmpty, set, set, setFromCenter, setFromCenter, setFromCorners, setHeight, setMaxX, setMaxY, setMinX, setMinY, setWidth, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.RoundRectangle2afp
contains, contains, equalsToShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getFlatteningPathIterator, getPathIterator, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, set, set
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Shape2afp
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
RoundRectangle2dfx
public RoundRectangle2dfx()
Construct an empty round rectangle.
-
RoundRectangle2dfx
public RoundRectangle2dfx(Point2D<?,?> min, Point2D<?,?> max, double arcWidth, double arcHeight)
Constructor.- Parameters:
min
- is the min corner of the rectangle.max
- is the max corner of the rectangle.arcWidth
- the width of the arcs.arcHeight
- the height of the arcs.
-
RoundRectangle2dfx
public RoundRectangle2dfx(RoundRectangle2afp<?,?,?,?,?,?> shape)
Constructor by copy.- Parameters:
shape
- the shape to copy.
-
RoundRectangle2dfx
public RoundRectangle2dfx(RectangularShape2afp<?,?,?,?,?,?> shape)
Constructor by copy.- Parameters:
shape
- the shape to copy.
-
RoundRectangle2dfx
public RoundRectangle2dfx(double x, double y, double width, double height, double arcWidth, double arcHeight)
Construct a round rectangle.- Parameters:
x
- x coordinate of the minimum corner.y
- y coordinate of the minimum corner.width
- width of the rectangle.height
- height of the rectangle.arcWidth
- width of the arcs.arcHeight
- height of the arcs.
-
-
Method Detail
-
clone
public RoundRectangle2dfx clone()
Description copied from interface:Shape2D
Clone this shape.- Specified by:
clone
in interfaceShape2D<Shape2dfx<?>,RoundRectangle2dfx,PathIterator2afp<PathElement2dfx>,Point2dfx,Vector2dfx,Rectangle2dfx>
- Overrides:
clone
in classAbstractRectangularShape2dfx<RoundRectangle2dfx>
- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Overrides:
hashCode
in classAbstractRectangularShape2dfx<RoundRectangle2dfx>
-
getArcWidth
@Pure public double getArcWidth()
Description copied from interface:RoundRectangle2afp
Gets the width of the arc that rounds off the corners.- Specified by:
getArcWidth
in interfaceRoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
- Returns:
- the width of the arc that rounds off the corners
of this
RoundRectangle2afp
.
-
arcWidthProperty
public javafx.beans.property.DoubleProperty arcWidthProperty()
Replies the property for the arc width.- Returns:
- the arcWidth property.
-
getArcHeight
@Pure public double getArcHeight()
Description copied from interface:RoundRectangle2afp
Gets the height of the arc that rounds off the corners.- Specified by:
getArcHeight
in interfaceRoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
- Returns:
- the height of the arc that rounds off the corners
of this
RoundRectangle2afp
.
-
arcHeightProperty
public javafx.beans.property.DoubleProperty arcHeightProperty()
Replies the property for the arc height.- Returns:
- the arcHeight property.
-
setArcWidth
public void setArcWidth(double arcWidth)
Description copied from interface:RoundRectangle2afp
Set the width of the arc that rounds off the corners.- Specified by:
setArcWidth
in interfaceRoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
- Parameters:
arcWidth
- is the width of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
setArcHeight
public void setArcHeight(double arcHeight)
Description copied from interface:RoundRectangle2afp
Set the height of the arc that rounds off the corners.- Specified by:
setArcHeight
in interfaceRoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
- Parameters:
arcHeight
- is the height of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
setFromCorners
public void setFromCorners(double x1, double y1, double x2, double y2)
Description copied from interface:RectangularShape2afp
Change the frame of the rectangle conserving previous min and max if needed.- Specified by:
setFromCorners
in interfaceRectangularShape2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
- Overrides:
setFromCorners
in classAbstractRectangularShape2dfx<RoundRectangle2dfx>
- Parameters:
x1
- is the coordinate of the first corner.y1
- is the coordinate of the first corner.x2
- is the coordinate of the second corner.y2
- is the coordinate of the second corner.
-
setFromCorners
public void setFromCorners(double x1, double y1, double x2, double y2, double arcWidth, double arcHeight)
Description copied from interface:RoundRectangle2afp
Change the frame of the rectangle.- Specified by:
setFromCorners
in interfaceRoundRectangle2afp<Shape2dfx<?>,RoundRectangle2dfx,PathElement2dfx,Point2dfx,Vector2dfx,Rectangle2dfx>
- Parameters:
x1
- is the coordinate of the first corner.y1
- is the coordinate of the first corner.x2
- is the coordinate of the second corner.y2
- is the coordinate of the second corner.arcWidth
- is the width of the arc that rounds off the corners of thisRoundRectangle2afp
.arcHeight
- is the height of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
-