new LayerClip(oLayer)
Parameters:
| Name | Type | Description |
|---|---|---|
oLayer |
Layer | Specifies the owner layer where the clipping region is applied as an object of Layer type. |
Members
CenterX :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "Ellipse" and the centerX and centerY fields to "width/2" and "height/2" respectively, it clips the layer to a circle that is centered within the layer, so only the part of the layer that falls within that circle is visible. By default, both centerX and centerY fields are null, which means that they are not set and the center of the clipping region is positioned according to its Left and Top properties when the type field is set to "Ellipse" or "Pie".
Type:
- number | string
Example
null {null}, the center of the clipping region is positioned according to its left and top fields when the type field is set to "Ellipse" or "Pie"
20 {number}, the center of the clipping region is always 20 pixels from the left edge of the layer regardless of its value when the type field is set to "Ellipse" or "Pie"
"width/2" {string}, the center of the clipping region is horizontally centered within the layer when the type field is set to "Ellipse" or "Pie" and the centerY field is also set to "height/2"
"value" {string}, the x-position of the center of the clipping region is determined by the clip's value or the RadialMenu.Value property when the type field is set to "Ellipse" or "Pie"
CenterX
CenterY :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "Ellipse" and the centerX and centerY fields to "width/2" and "height/2" respectively, it clips the layer to a circle that is centered within the layer, so only the part of the layer that falls within that circle is visible. By default, both centerX and centerY fields are null, which means that they are not set and the center of the clipping region is positioned according to its Left and Top properties when the type field is set to "Ellipse" or "Pie".
Type:
- number | string
Example
null {null}, the center of the clipping region is positioned according to its left and top fields when the type field is set to "Ellipse" or "Pie"
20 {number}, the center of the clipping region is always 20 pixels from the top edge of the layer regardless of its value when the type field is set to "Ellipse" or "Pie"
"height/2" {string}, the center of the clipping region is vertically centered within the layer when the type field is set to "Ellipse" or "Pie" and the centerX field is also set to "width/2"
"value" {string}, the y-position of the center of the clipping region is determined by the clip's value or the RadialMenu.Value property when the type field is set to "Ellipse" or "Pie"
CenterY
Height :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the Height property to "value", it means that the height of the clipping region is determined by the clip's value or the RadialMenu.Value property, so when the value changes, the height of the clipping region changes accordingly. If you set it to a constant number like 100, it means that the height of the clipping region is always 100 pixels regardless of its value. By default, the Height property is null, which means that it is not set and does not affect the size of the clipping region.
Type:
- number | string
Example
null {null}, the height of the clipping region is not set and does not affect the size of the clipping region
100 {number}, the height of the clipping region is always 100 pixels regardless of its value
"value" {string}, the height of the clipping region is determined by the clip's value or the RadialMenu.Value property
Height
Left :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the Left property to "value", it means that the left position of the clipping region is determined by the clip's value or the RadialMenu.Value property, so when the value changes, the left position of the clipping region changes accordingly. If you set it to a constant number like 20, it means that the left position of the clipping region is always 20 pixels from the left edge of the layer regardless of its value. By default, the Left property is null, which means that it is not set and does not affect the position of the clipping region.
Type:
- number | string
Example
null {null}, the left position of the clipping region is not set and does not affect the position of the clipping region
20 {number}, the left position of the clipping region is always 20 pixels from the left edge of the layer regardless of its value
"value" {string}, the left position of the clipping region is determined by the clip's value or the RadialMenu.Value property
Left
OffsetX :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the OffsetX property to "value", it means that the clipping region is shifted to the right by an amount equal to the clip's value or the RadialMenu.Value property, so when the value changes, the clipping region moves horizontally accordingly. If you set it to a constant number like 20, it means that the clipping region is always shifted 20 pixels to the right relative to the layer regardless of its value. Similarly, if you set it to "-value", it means that the clipping region is shifted to the left by an amount equal to the clip's value or the RadialMenu.Value property, so when the value changes, the clipping region moves horizontally accordingly in the opposite direction. By default, the OffsetX property is null, which means that there is no horizontal offset and the clipping region is positioned according to its Left and CenterX properties.
Type:
- number | string
Example
null {null}, there is no horizontal offset and the clipping region is positioned according to its left and centerX fields
20 {number}, the clipping region is always shifted 20 pixels to the right relative to the layer regardless of its value
"value" {string}, the clipping region is shifted to the right by an amount equal to the clip's value or the RadialMenu.Value property
OffsetX
OffsetY :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the OffsetY property to "value", it means that the clipping region is shifted downwards by an amount equal to the clip's value or the RadialMenu.Value property, so when the value changes, the clipping region moves vertically accordingly. If you set it to a constant number like 20, it means that the clipping region is always shifted 20 pixels downwards relative to the layer regardless of its value. Similarly, if you set it to "-value", it means that the clipping region is shifted upwards by an amount equal to the clip's value or the RadialMenu.Value property, so when the value changes, the clipping region moves vertically accordingly in the opposite direction. By default, the OffsetY property is null, which means that there is no vertical offset and the clipping region is positioned according to its Top and CenterY properties.
Type:
- number | string
Example
null {null}, there is no vertical offset and the clipping region is positioned according to its top and centerY fields
20 {number}, the clipping region is always shifted 20 pixels downwards relative to the layer regardless of its value
"value" {string}, the clipping region is shifted downwards by an amount equal to the clip's value or the RadialMenu.Value property
OffsetY
Options :LayerClipOptions
Every option of the LayerClipOptions type has associated a property of the LayerClip object. For instance, the option:
type {string}, specifies the type of the clip, such as "rectangle", "ellipse" and so onis associated with the property:
Type {string}, specifies the type of the clip, such as "rectangle", "ellipse" and so onwhich means that the following statements are equivalent:
oClip.Options = {type: "ellipse"}
oClip.SetOptions({type: "ellipse"})
oClip.Type = "ellipse"
oClip.SetType("ellipse")
It is important to note that changing a field of the Options object does not automatically update the clip. For example, oClip.Options.type = "ellipse" does not apply the change. Instead, you must assign the Options property again, such as oClip.Options = {type: "ellipse"}, so the control updates and applies the new value.
Type:
- Since:
- 5.4
Example
The following statements are equivalents:
oClip.Options = {type: "ellipse"}
oClip.SetOptions({type: "ellipse"})
where oClip is an object of LayerClip type
Options
RadiusX :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "Ellipse" and the radiusX and radiusY fields to 50, it clips the layer to a circle with a radius of 50 pixels, so only the part of the layer that falls within that circle is visible. By default, both radiusX and radiusY fields are null, which means that they are not set and do not affect the size of the clipping region when the type field is set to "Ellipse" or "Pie".
Type:
- number | string
Example
null {null}, the radiusX does not affect the size of the clipping region when the type field is set to "Ellipse" or "Pie"
50 {number}, the clipping region is a circle with a radius of 50 pixels when the type field is set to "Ellipse" and the radiusY field is also set to 50
"value" {string}, the radiusX of the clipping region is determined by the clip's value or the RadialMenu.Value property when the type field is set to "Ellipse" or "Pie"
"width/2" {string}, the radiusX of the clipping region is half the width of the layer when the type field is set to "Ellipse" or "Pie"
RadiusX
RadiusY :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "Ellipse" and the radiusX and radiusY fields to 50, it clips the layer to a circle with a radius of 50 pixels, so only the part of the layer that falls within that circle is visible. By default, both radiusX and radiusY fields are null, which means that they are not set and do not affect the size of the clipping region when the type field is set to "Ellipse" or "Pie".
Type:
- number | string
Example
null {null}, the radiusY does not affect the size of the clipping region when the type field is set to "Ellipse" or "Pie"
50 {number}, the clipping region is a circle with a radius of 50 pixels when the type field is set to "Ellipse" and the radiusX field is also set to 50
"value" {string}, the radiusY of the clipping region is determined by the clip's value or the RadialMenu.Value property when the type field is set to "Ellipse" or "Pie"
"height/2" {string}, the radiusY of the clipping region is half the height of the layer when the type field is set to "Ellipse" or "Pie"
RadiusY
RoundRadiusX :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "RoundRect" and the roundRadiusX and roundRadiusY fields to 20, it clips the layer to a rectangle with rounded corners that have an x-radius and y-radius of 20 pixels, so only the part of the layer that falls within that rounded rectangle is visible. By default, both roundRadiusX and roundRadiusY fields are null, which means that there is no rounding and if you set the type field to "RoundRect", it behaves like a regular rectangle clip.
Type:
- number | string
Example
null {null}, there is no rounding and if you set the type field to "RoundRect", it behaves like a regular rectangle clip
20 {number}, the clipping region is a rectangle with rounded corners that have an x-radius of 20 pixels when the type field is set to "RoundRect"
RoundRadiusX
RoundRadiusY :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "RoundRect" and the roundRadiusX and roundRadiusY fields to 20, it clips the layer to a rectangle with rounded corners that have an x-radius and y-radius of 20 pixels, so only the part of the layer that falls within that rounded rectangle is visible. By default, both roundRadiusX and roundRadiusY fields are null, which means that there is no rounding and if you set the type field to "RoundRect", it behaves like a regular rectangle clip.
Type:
- number | string
Example
null {null}, there is no rounding and if you set the type field to "RoundRect" (it behaves like a regular rectangle clip)
20 {number}, the clipping region is a rectangle with rounded corners that have a y-radius of 20 pixels when the type field is set to "RoundRect"
RoundRadiusY
StartAngle :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "Pie", the radiusX and radiusY fields to 50, the centerX and centerY fields to "width/2" and "height/2" respectively, the startAngle field to 0, and the sweepAngle field to "value", it clips the layer to a pie shape that starts from the rightmost point of the circle (0 degrees) and sweeps clockwise by an angle determined by the clip's value or the RadialMenu.Value property, so only the part of the layer that falls within that pie shape is visible. By default, both startAngle and sweepAngle fields are null, which means that they are not set and do not affect the angles of the pie-shaped clipping region when the type field is set to "Pie".
Type:
- number | string
Example
null {null}, the start angle of the pie-shaped clipping region is not set and does not affect the angles of the pie-shaped clipping region when the type field is set to "Pie"
0 {number}, the pie-shaped clipping region starts from the rightmost point of the circle (0 degrees) when the type field is set to "Pie"
"value" {string}, the sweep angle of the pie-shaped clipping region is determined by the clip's value or the RadialMenu.Value property when the type field is set to "Pie"
StartAngle
SweepAngle :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the type field to "Pie", the radiusX and radiusY fields to 50, the centerX and centerY fields to "width/2" and "height/2" respectively, the startAngle field to 0, and the sweepAngle field to "value", it clips the layer to a pie shape that starts from the rightmost point of the circle (0 degrees) and sweeps clockwise by an angle determined by the clip's value or the RadialMenu.Value property, so only the part of the layer that falls within that pie shape is visible. By default, both startAngle and sweepAngle fields are null, which means that they are not set and do not affect the angles of the pie-shaped clipping region when the type field is set to "Pie".
Type:
- number | string
Example
null {null}, the sweep angle of the pie-shaped clipping region is not set and does not affect the angles of the pie-shaped clipping region when the type field is set to "Pie"
15 {number}, the pie-shaped clipping region sweeps by an angle of 15 degrees in a clockwise direction when the type field is set to "Pie"
"value" {string}, the sweep angle of the pie-shaped clipping region is determined by the clip's value or the RadialMenu.Value property when the type field is set to "Pie"
SweepAngle
Top :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the Top property to "value", it means that the top position of the clipping region is determined by the clip's value or the RadialMenu.Value property, so when the value changes, the top position of the clipping region changes accordingly. If you set it to a constant number like 20, it means that the top position of the clipping region is always 20 pixels from the top edge of the layer regardless of its value. By default, the Top property is null, which means that it is not set and does not affect the position of the clipping region.
Type:
- number | string
Example
null {null}, the top position of the clipping region is not set and does not affect the position of the clipping region
20 {number}, the top position of the clipping region is always 20 pixels from the top edge of the layer regardless of its value
"value" {string}, the top position of the clipping region is determined by the clip's value or the RadialMenu.Value property
Top
Type :string
Type:
- string
Example
null {null}, there is no clipping region and the whole layer is visible
"RoundRect" {string}, defines a rectangular clipping region with rounded corners (which uses the roundRadiusX and roundRadiusY fields to define the x and y radius of the rounded corners)
Type
Value :number
Type:
- number
Example
null {null}, the "value" keyword in the expressions of the other fields of the LayerClipOptions type is determined by the RadialMenu.Value property
50 {number}, the clip's value is 50 so the "value" keyword in the expressions of the other fields of the LayerClipOptions type is 50
Value
Width :number|string
The expression supports the following keywords:
"value", indicates the Value property if defined or the RadialMenu.Value property
"width" or "lwidth", indicates the width in pixels of the layer
"height" or "lheight", indicates the height in pixels of the layer
For instance, if you set the Width property to "value", it means that the width of the clipping region is determined by the clip's value or the RadialMenu.Value property, so when the value changes, the width of the clipping region changes accordingly. If you set it to a constant number like 100, it means that the width of the clipping region is always 100 pixels regardless of its value. By default, the Width property is null, which means that it is not set and does not affect the size of the clipping region.
Type:
- number | string
Example
null {null}, the width of the clipping region is not set and does not affect the size of the clipping region
100 {number}, the width of the clipping region is always 100 pixels regardless of its value
"value" {string}, the width of the clipping region is determined by the clip's value or the RadialMenu.Value property
Width