size([size])

Class: Shape.

Description:

Returns the size of a shape. Does not set a new size. Some shapes override this function and size can be set for those shapes. (e.g. Rectangle, Ellipse)
If the Shape is not added to a any UI Component, then null is returned.

Parameters:

Name Type Description

[size]

Size

Size formatted object, but only for shapes that allow setting new size, such as Rectangle or Ellipse.

Returns:

If called without parameters, returns current size, or null if the shape is not added to a component. When setting size, this shape instance is returned for method chaining.

Type: Size | this

Also See: