Constructor
new Ellipse(strokeopt, backgroundopt, opacityopt, xopt, yopt, widthopt, heightopt)
Creates an instance of Arc shape.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
stroke | Stroke | <optional> | A border of the shape. | |
background | string | <optional> | Color, gradient, or image background, similar to CSS. Use an empty string to remove the background. | |
opacity | number | <optional> | 1 | Opacity of the shape (0 to 1). |
x | number | <optional> | 0 | Horizontal position from the left edge. |
y | number | <optional> | 0 | Vertical position from the top edge. |
width | number | <optional> | 100 | Width of the ellipse (horizontal diameter). |
height | number | <optional> | Height of the ellipse (vertical diameter). If omitted, height will be same as width. |
- See
Classes
Methods
size(width, heightopt) → {Size|Ellipse}
Sets or gets the size of the Ellipse (horizontal and vertical diameter).
| Name | Type | Attributes | Description |
|---|---|---|---|
width | number | | Width of the ellipse (horizontal diameter), or a | |
height | number | <optional> | Height of the ellipse (vertical diameter). |
- See
If called without parameters, current size is returned; otherwise this Ellipse object is returned.
toObject(includeopt) → {object}
Returns a JSON object that contains this shape properties. It may be converted back to this shape.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
include | string | <optional> | "all" | Specified what to include. "all" is default. Valid values are: "all", "stroke", "background", "points", "basic". |
Returns an object containing this shape's properties.
- Type:
- object