cornerArc(width, [height])
Class: Rectangle.
Description:
Sets corner radius if only one argument passed, or arc width and height if two arguments or size object supplied. The arc size is applied to all corners.
This a way to create all rounded corners with arc of same or different width and height. If you want to specify corner radius for specific corners, use Rectangle > cornerRadius method: cornerRadius(...).
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
number | Object |
Width of the corner arc, or a size object (e.g., {width:300,height:300}). |
|
|
number |
Height of the corner arc. |
Returns:
If called without parameters, current arc size is returned; otherwise this Rectangle object is returned.
Type: Object | Rectangle
Examples:
Valid ways to set arc size:
rectangle.cornerArc(radius);
rectangle.cornerArc(width,height);
rectangle.cornerArc({width:5,height:10});
