position of the rounded rectangle
position of the rounded rectangle
the rectangle width
the rectangle height
Optional
radius: number = DEFAULT_RADIUSthe radius of the rounded corner
Corner radius.
The edges here are the direction of the n
th edge of the polygon, relative to
the n
th point. If you want to draw a given edge from the edge value, you must
first translate to the position of the starting point.
a list of indices for all vertices composing this polygon
Array of points defining the Polygon
Note: If you manually change points
, you must call recalc
afterwards so that the changes get applied correctly.
origin point of the Polygon
the shape type (used internally)
bottom coordinate of the Rectangle
absolute center of this rectangle on the horizontal axis
absolute center of this rectangle on the vertical axis
height of the Rectangle
The left coordinate of the Rectangle.
the radius of the rounded corner
right coordinate of the Rectangle
top coordinate of the Rectangle
width of the Rectangle
Returns true if the rounded rectangle contains the given point or rectangle
x coordinate or a vector point, or a Rect to test
Optional
y: numbery coordinate
True if the rounded rectangle contain the given point or rectangle, otherwise false
Returns true if the polygon contains the given point.
(Note: it is highly recommended to first do a hit test on the corresponding
bounding rect, as the function can be highly consuming with complex shapes)
True if the polygon contain the point, otherwise false
Returns true if the rectangle contains the given rectangle
rectangle to test
True if the rectangle contain the given rectangle, otherwise false
check if this RoundRect is identical to the specified one
Other rounded rectangle.
true if equals
check if this rectangle is intersecting with the specified one
Other rectangle.
true if overlaps
set new value to the Polygon
position of the Polygon
position of the Polygon
array of vector or vertice defining the Polygon
this instance for objecf chaining
set the vertices defining this Polygon
array of vector or vertice defining the Polygon
this instance for objecf chaining
Shifts the Polygon to the given position vector.
The x coordinate or a vector point to shift to.
Optional
y: numberThe y coordinate. This parameter is required if the first parameter is a number.
Translates the Polygon by the specified offset.
The x offset or a vector point to translate by.
Optional
y: numberThe y offset. This parameter is required if the first parameter is a number.
Reference to this object for method chaining
a rectangle object with rounded corners