position of the rounded rectangle
position of the rounded rectangle
the rectangle width
the rectangle height
Optionalradius: number = DEFAULT_RADIUSthe radius of the rounded corner
Corner radius.
The edges here are the direction of the nth edge of the polygon, relative to
the nth 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 recalcafterwards 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.
right coordinate of the Rectangle
top coordinate of the Rectangle
width of the Rectangle
center the rectangle position around the given coordinates
the x coordinate around which to center this rectangle
the y coordinate around which to center this rectangle
this rectangle
Returns true if the rounded rectangle contains the given point or rectangle
x coordinate or a vector point, or a Rect to test
Optionaly: numbery coordinate
True if the rounded rectangle contain the given point or rectangle, otherwise false
Returns true if the rounded rectangle contains the given point or rectangle
True if the rounded rectangle contain the given point or rectangle, 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
returns the bounding box for this shape, the smallest Rectangle object completely containing this shape.
this shape bounding box Rectangle object
returns a list of indices for all triangles defined in this polygon
an array of vertex indices for all triangles forming this polygon.
Returns true if the vertices composing this polygon form a convex shape (vertices must be in clockwise order).
true if the vertices are convex, false if not, null if not computable
Determines whether all coordinates of this rectangle are finite numbers.
false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
check if this rectangle is intersecting with the specified one
Other rectangle.
true if overlaps
Computes the calculated collision polygon.
This must be called if the points array, angle, or offset is modified manually.
Reference to this object for method chaining
resize the rectangle
new width of the rectangle
new height of the rectangle
this rectangle
scale the rectangle
a number representing the abscissa of the scaling vector.
Optionaly: number = xa number representing the ordinate of the scaling vector.
this rectangle
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 new dimensions for the rectangle.
The new width of the rectangle.
The new height of the rectangle.
set the vertices defining this Polygon
array of vector or vertice defining the Polygon
this instance for objecf chaining
apply an isometric projection to this shape
Reference to this object for method chaining
Returns a polygon whose edges are the same as this box.
a new Polygon that represents this rectangle.
Translates the Polygon by the specified offset.
The x offset or a vector point to translate by.
Optionaly: 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