Methods
Draw Rectangle with chamfer corners. These are angled corners.
Name | Type | Attributes | Description |
---|---|---|---|
x |
number |
Upper left corner of rect |
|
y |
number |
Upper right corner of rect |
|
width |
number |
Width of rect |
|
height |
number |
Height of rect |
|
chamfer |
number |
non-zero real number, size of corner cutout |
|
transform |
Matrix |
<optional> |
Returns:
Type | Description |
---|---|
this |
Draw Rectangle with fillet corners. This is much like rounded rectangle however it support negative numbers as well for the corner radius.
Name | Type | Description |
---|---|---|
x |
number |
Upper left corner of rect |
y |
number |
Upper right corner of rect |
width |
number |
Width of rect |
height |
number |
Height of rect |
fillet |
number |
accept negative or positive values |
Returns:
Type | Description |
---|---|
this |
Draw a Shape with rounded corners. Supports custom radius for each point.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
points |
RoundedPoint[] |
Corners of the shape to draw. Minimum length is 3. |
||
radius |
number |
Corners default radius. |
||
useQuadratic |
boolean | false |
If true, rounded corners will be drawn using quadraticCurve instead of arc. |
|
smoothness |
number |
<optional> |
If using quadraticCurve, this is the smoothness of the curve. |
Returns:
Type | Description |
---|---|
this |