Top
You are looking at an outdated 7.4.0 version of this document. Switch to the 7.14.3 version to see the up to date information.

class anychart.graphics.vector.Rect Improve this Doc

Extends: anychart.graphics.vector.PathBase

Rectangle class
Do not invoke constructor directly. Use anychart.graphics.vector.Stage#rect or anychart.graphics.vector.Layer#rect to create stage or layer bound rectangle.
If you need unbound rectangle - use anychart.graphics.rect.

Methods Overview

Miscellaneous
cut()Sets cut corners.
round()Sets corners rounding.
roundInner()Sets corners inner rounding.
setBounds()Sets bounds.
setCoordinate()Sets position in parent container.
setHeight()Sets height.
setSize()Sets size.
setWidth()Sets width.
setX()Sets X in parent container.
setY()Sets Y in parent container.

Methods Description

cut

Sets cut corners.

Params:

Name Type Description
radiusAll string | number Radius for all corners if only one value is provided, top-left corner if other values are set. Four values should be in topLeft, topRight, bottomRight, bottomLeft order.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.
Sets cut corners.

Params:

Name Type Description
radiusLeftTop string | number Radius for all corners if only one value is provided, top-left corner if other values are set. Four values should be in topLeft, topRight, bottomRight, bottomLeft order.
radiusRightTop number Top-right corner radius.
radiusRightBottom number Bottom-right corner radius.
radiusLeftBottom number Bottom-left corner radius.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

round

Sets corners rounding.

Params:

Name Type Description
radiusAll string | number Radius for all corners if only one value is provided, top-left corner if other values are set. Four values should be in topLeft, topRight, bottomRight, bottomLeft order.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.
Sets corners rounding.

Params:

Name Type Description
radiusLeftTop string | number Radius for all corners if only one value is provided, top-left corner if other values are set. Four values should be in topLeft, topRight, bottomRight, bottomLeft order.
radiusRightTop number Top-right corner radius.
radiusRightBottom number Bottom-right corner radius.
radiusLeftBottom number Bottom-left corner radius.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

roundInner

Sets corners inner rounding.

Params:

Name Type Description
radiusAll string | number Radius for all corners if only one value is provided, top-left corner if other values are set. Four values should be in topLeft, topRight, bottomRight, bottomLeft order.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.
Sets corners inner rounding.

Params:

Name Type Description
radiusLeftTop string | number Radius for all corners if only one value is provided, top-left corner if other values are set. Four values should be in topLeft, topRight, bottomRight, bottomLeft order.
radiusRightTop number Top-right corner radius.
radiusRightBottom number Bottom-right corner radius.
radiusLeftBottom number Bottom-left corner radius.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setBounds

Sets bounds.

Params:

Name Type Description
value anychart.graphics.math.Rect Bounds.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setCoordinate

Sets position in parent container.

Params:

Name Type Description
value anychart.graphics.math.Coordinate Position in parent container.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setHeight

Sets height.

Params:

Name Type Description
value number Height.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setSize

Sets size.

Params:

Name Type Description
value anychart.graphics.math.Size Size.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setWidth

Sets width.

Params:

Name Type Description
value number Width.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setX

Sets X in parent container.

Params:

Name Type Description
value number X in parent container.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it:

setY

Sets Y in parent container.

Params:

Name Type Description
value number Y in parent container.

Returns:

anychart.graphics.vector.Rect - Self instance for method chaining.

Try it: