AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.10.1 version of this document. Switch to the 8.4.0 version to see the up to date information.

class anychart.graphics.vector.Clip Improve this Doc

Class representing independent clip, that can be applied to any element.
Used to set one clip to many elements, and updates only clip.

Methods Overview

Miscellaneous
dispose()Disposes a clip. Removes it and its children from defs, clears the clip for managed elements.
shape()Shape settings for the clip.

Methods Description

dispose

Disposes a clip. Removes it and its children from defs, clears the clip for managed elements.

shape

Getter for the current shape of the clip.

Returns:

anychart.graphics.vector.Shape - The current shape.
See listing
var rectangle = stage.rect(20, 20, 100, 100);
rectangle.clip(stage.createClip());
var clipArea = rectangle.clip();
clipArea.shape();
Setter for the shape of the clip.

Params:

NameTypeDescription
shapeArray.<number> | anychart.graphics.vector.Shape | anychart.graphics.math.Rect | Object | nullRect or vector shape or array or object representing bounds.

Returns:

anychart.graphics.vector.Clip - Self instance for method chaining.
Setter for the shape of the clip with coordinates.

Params:

NameTypeDescription
leftnumberLeft coordinate.
topnumberTop coordinate.
widthnumberWidth of the rect.
heightnumberHeight of the rect.

Returns:

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