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.
Try it:
shape
Getter for the shape of the clip.
Returns:
anychart.graphics.vector.Shape - Returns shape instance. See listing
var rectangle = stage.rect(20, 20, 100, 100); rectangle.clip(stage.createClip()); var clipArea = rectangle.clip(); var shape = clipArea.shape();
Setter for the shape of the clip.
Detailed description
You can update or change the shape of the clip element. If you don't use anychart.graphics.vector.Shape,
the shape of the clip will be a rectangle.
Params:
Name | Type | Description |
---|---|---|
shape | Array.<number> | anychart.graphics.vector.Shape | anychart.graphics.math.Rect | Object | null | Rect or vector shape or array or object representing bounds. |
Returns:
anychart.graphics.vector.Clip - Self instance for method chaining.Try it:
Setter for the shape of the clip with coordinates.
Params:
Name | Type | Description |
---|---|---|
left | number | Left coordinate. |
top | number | Top coordinate. |
width | number | Width of the rect. |
height | number | Height of the rect. |
Returns:
anychart.graphics.vector.Clip - Self instance for method chaining.Try it: