LayerClipOptions class (Gauge)

LayerClipOptions()

new LayerClipOptions()

The LayerClipOptions type holds all options a LayerClip object can display or own. The LayerClip.Options property sets or gets multiple options of a LayerClip object at once, through an object of LayerClipOptions type. The LayerClip object defines the clipping region of a layer, which restricts the visible area of the layer to a specific shape or region. The type field specifies the type of the clipping region, such as "rectangle", "ellipse", "pie", etc., while the other fields define the size and position of the clipping region relative to 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.

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 clipping the current layer supports
is associated with the property:
Type {string}, specifies the type of the clipping the current layer supports
which means that the following statements are equivalent:
oClip.Options = {type: "ellipse"}
oClip.SetOptions({type: "ellipse"})
oClip.Type = "ellipse"
oClip.SetType("ellipse")
where oClip is an object of LayerClip type
Since:
  • 5.4

Members

(static) centerX :number|string

The centerX field indicates the x-position or a format-expression that defines the x-position of the center of the clipping region relative to the layer, which corresponds to the [clip.xCenter] flag used in layers field, while the centerY field defines the y-position value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 fields when the type field is set to "Ellipse" or "Pie".

The centerX field is mapped to the LayerClip.CenterX property, which means that the following statements are equivalent:

oClip.Options = {centerX: "width/2"}
oClip.SetOptions({centerX: "width/2"})
oClip.CenterX = "width/2"
oClip.SetCenterX("width/2")
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 Gauge.Value property when the type field is set to "Ellipse" or "Pie"
centerX

(static) centerY :number|string

The centerY field indicates the y-position or a format-expression that defines the y-position of the center of the clipping region relative to the layer, which corresponds to the [clip.yCenter] flag used in layers field, while the centerX field defines the x-position value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 fields when the type field is set to "Ellipse" or "Pie".

The centerY field is mapped to the LayerClip.CenterY property, which means that the following statements are equivalent:

oClip.Options = {centerY: "height/2"}
oClip.SetOptions({centerY: "height/2"})
oClip.CenterY = "height/2"
oClip.SetCenterY("height/2")
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 Gauge.Value property when the type field is set to "Ellipse" or "Pie"
centerY

(static) height :number|string

The height field indicates the height value or a format-expression that defines the height of the clipping region relative to the layer, which corresponds to the [clip.height] flag used in layers field. The left, top, width fields define the size and position of the clipping region relative to the layer, while the offsetX and offsetY fields can be used to shift the entire clipping region horizontally and vertically relative to the layer.

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 field to "value", it means that the height of the clipping region is determined by the clip's value or the Gauge.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 field is null, which means that it is not set and does not affect the size of the clipping region.

The height field is mapped to the LayerClip.Height property, which means that the following statements are equivalent:

oClip.Options = {height: "value"}
oClip.SetOptions({height: "value"})
oClip.Height = "value"
oClip.SetHeight("value")
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 Gauge.Value property
height

(static) left :number|string

The left field indicates the left position or a format-expression that defines the left position of the clipping region relative to the layer, which corresponds to the [clip.left] flag used in layers field. The top, width, height fields define the size and position of the clipping region relative to the layer, while the offsetX and offsetY fields can be used to shift the entire clipping region horizontally and vertically relative to the layer.

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 field to "value", it means that the left position of the clipping region is determined by the clip's value or the Gauge.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 field is null, which means that it is not set and does not affect the position of the clipping region.

The left field is mapped to the LayerClip.Left property, which means that the following statements are equivalent:

oClip.Options = {left: "value"}
oClip.SetOptions({left: "value"})
oClip.Left = "value"
oClip.SetLeft("value")
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 Gauge.Value property
left

(static) offsetX :numner|string

The offsetX field indicates the value to shift the clipping region horizontally relative to the layer, or a format-expression that defines how much to shift the clipping region based on the clip's value or the Gauge.Value property, which corresponds to the [clip.x] flag used in layers field. The left, top, width, height field define the size and position of the clipping region relative to the layer, while the offsetX and offsetY fields can be used to shift the entire clipping region horizontally and vertically relative to the layer.

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 field to "value", it means that the clipping region is shifted to the right by an amount equal to the clip's value or the Gauge.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 Gauge.Value property, so when the value changes, the clipping region moves horizontally accordingly in the opposite direction. By default, the offsetX field is null, which means that there is no horizontal offset and the clipping region is positioned according to its left and centerX fields.

The offsetX field is mapped to the LayerClip.OffsetX property, which means that the following statements are equivalent:

oClip.Options = {offsetX: "value"}
oClip.SetOptions({offsetX: "value"})
oClip.OffsetX = "value"
oClip.SetOffsetX("value")
Type:
  • numner | 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 Gauge.Value property
offsetX

(static) offsetY :number|string

The offsetY field indicates the value to shift the clipping region vertically relative to the layer, or a format-expression that defines how much to shift the clipping region based on the clip's value or the Gauge.Value property, which corresponds to the [clip.y] flag used in layers field. The left, top, width, height field define the size and position of the clipping region relative to the layer, while the offsetX and offsetY fields can be used to shift the entire clipping region horizontally and vertically relative to the layer.

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 field to "value", it means that the clipping region is shifted downwards by an amount equal to the clip's value or the Gauge.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 Gauge.Value property, so when the value changes, the clipping region moves vertically accordingly in the opposite direction. By default, the offsetY field is null, which means that there is no vertical offset and the clipping region is positioned according to its top and centerY fields.

The offsetY field is mapped to the LayerClip.OffsetY property, which means that the following statements are equivalent:

oClip.Options = {offsetY: "value"}
oClip.SetOptions({offsetY: "value"})
oClip.OffsetY = "value"
oClip.SetOffsetY("value")
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 Gauge.Value property
offsetY

(static) radiusX :number|string

The radiusX field indicates the x-radius value or a format-expression that defines the x-radius of the clipping region when the type field is set to "Ellipse" or "Pie", which corresponds to the [clip.radiusX] flag used in layers field, while the radiusY field defines the y-radius value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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".

The radiusX field is mapped to the LayerClip.RadiusX property, which means that the following statements are equivalent:

oClip.Options = {radiusX: 50}
oClip.SetOptions({radiusX: 50})
oClip.RadiusX = 50
oClip.SetRadiusX(50)
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 Gauge.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

(static) radiusY :number|string

The radiusY field indicates the y-radius value or a format-expression that defines the y-radius of the clipping region when the type field is set to "Ellipse" or "Pie", which corresponds to the [clip.radiusY] flag used in layers field, while the radiusX field defines the x-radius value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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".

The radiusY field is mapped to the LayerClip.RadiusY property, which means that the following statements are equivalent:

oClip.Options = {radiusY: 50}
oClip.SetOptions({radiusY: 50})
oClip.RadiusY = 50
oClip.SetRadiusY(50)
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 Gauge.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

(static) roundRadiusX :number|string

The roundRadiusX field indicates the x-radius value or a format-expression that defines the x-radius of the round corner of the clipping region when the type field is set to "RoundRect", which corresponds to the [clip.roundX] flag used in layers field, while the roundRadiusY field defines the y-radius value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the roundRadiusX and roundRadiusY fields define the roundness of the corners when the type is "RoundRect".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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.

The roundRadiusX field is mapped to the LayerClip.RoundRadiusX property, which means that the following statements are equivalent:

oClip.Options = {roundRadiusX: 20}
oClip.SetOptions({roundRadiusX: 20})
oClip.RoundRadiusX = 20
oClip.SetRoundRadiusX(20)
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

(static) roundRadiusY :number|string

The roundRadiusY field indicates the y-radius value or a format-expression that defines the y-radius of the round corner of the clipping region when the type field is set to "RoundRect", which corresponds to the [clip.roundY] flag used in layers field, while the roundRadiusX field defines the x-radius value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the roundRadiusX and roundRadiusY fields define the roundness of the corners when the type is "RoundRect".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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.

The roundRadiusY field is mapped to the LayerClip.RoundRadiusY property, which means that the following statements are equivalent:

oClip.Options = {roundRadiusY: 20}
oClip.SetOptions({roundRadiusY: 20})
oClip.RoundRadiusY = 20
oClip.SetRoundRadiusY(20)
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

(static) startAngle :number|string

The startAngle field indicates the starting angle or a format-expression that defines the starting angle of the pie-shaped clipping region when the type field is set to "Pie", which corresponds to the [clip.start] flag used in layers field, while the sweepAngle field defines the sweep angle value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 Gauge.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".

The startAngle field is mapped to the LayerClip.StartAngle property, which means that the following statements are equivalent:

oClip.Options = {startAngle: 0}
oClip.SetOptions({startAngle: 0})
oClip.StartAngle = 0
oClip.SetStartAngle(0)
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 Gauge.Value property when the type field is set to "Pie"
startAngle

(static) sweepAngle :number|string

The sweepAngle field indicates the sweep angle or a format-expression that defines the sweep angle of the pie-shaped clipping region when the type field is set to "Pie", which corresponds to the [clip.sweep] flag used in layers field, while the startAngle field defines the starting angle value. The left, top, width, height fields define the size and position of the clipping region relative to the layer, while the radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie".

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 Gauge.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".

The sweepAngle field is mapped to the LayerClip.SweepAngle property, which means that the following statements are equivalent:

oClip.Options = {sweepAngle: "value"}
oClip.SetOptions({sweepAngle: "value"})
oClip.SweepAngle = "value"
oClip.SetSweepAngle("value")
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 Gauge.Value property when the type field is set to "Pie"
sweepAngle

(static) top :number|string

The top field indicates the top position or a format-expression that defines the top position of the clipping region relative to the layer, which corresponds to the [clip.top] flag used in layers field. The left, width, height fields define the size and position of the clipping region relative to the layer, while the offsetX and offsetY fields can be used to shift the entire clipping region horizontally and vertically relative to the layer.

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 field to "value", it means that the top position of the clipping region is determined by the clip's value or the Gauge.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 field is null, which means that it is not set and does not affect the position of the clipping region.

The top field is mapped to the LayerClip.Top property, which means that the following statements are equivalent:

oClip.Options = {top: "value"}
oClip.SetOptions({top: "value"})
oClip.Top = "value"
oClip.SetTop("value")
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 Gauge.Value property
top

(static) type :string

The type field specifies the type of the clipping region the current layer supports, such as "Rect","RoundRect","Ellipse" or "Pie", which corresponds to the [clip] flag used in layers field. The value of the type field determines how the other fields of the LayerClipOptions type are interpreted to define the clipping region. The left, top, width, and height fields are used to define the base clip region, while the roundRadiusX and roundRadiusY fields are used to define the roundness of the corners when the type is "RoundRect". The radiusX, radiusY, centerX, and centerY fields are used to define the size and position of the clipping region when the type is "Ellipse" or "Pie". The startAngle and sweepAngle fields are used to define the angles of the pie-shaped clipping region when the type is "Pie". The offsetX and offsetY fields can be used to shift the clipping region horizontally and vertically relative to the layer. Setting any other property of the LayerClipOptions type without setting the type field will not have any effect, as the type field determines how the other properties are applied to create the clipping region. By default, the type field is null, which means that there is no clipping region and the whole layer is visible.

The type field is mapped to the Type property, which means that the following statements are equivalent:

oClip.Options = {type: "ellipse"}
oClip.SetOptions({type: "ellipse"})
oClip.Type = "ellipse"
oClip.SetType("ellipse")
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

(static) value :number

The value field indicates the clip's value, which corresponds to the [clip.value] flag used in layers field. The value field can be used to link the clip's value or the Gauge.Value property to "value" keyword in format-expressions of the other fields of the LayerClipOptions type, so that the size and position of the clipping region can change dynamically based on the clip's value or the Gauge.Value property. For instance, if you set the left field to "value", it means that the left position of the clipping region is determined by the clip's value or the Gauge.Value property, so when the value changes, the left position of the clipping region changes accordingly. Similarly, if you set the width field to "value*2", it means that the width of the clipping region is twice the clip's value or the Gauge.Value property, so when the value changes, the width of the clipping region changes accordingly. The interpretation of the clip's value depends on how you use it in the expressions for defining the clipping region. By default, the value field is null, which means that it is not linked to any expression and does not affect the clipping region.

The value field is mapped to the LayerClip.Value property, which means that the following statements are equivalent:

oClip.Options = {value: 50}
oClip.SetOptions({value: 50})
oClip.Value = 50
oClip.SetValue(50)
Type:
  • number
Example
null {null}, the "value" keyword in the expressions of the other fields of the LayerClipOptions type is determined by the Gauge.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

(static) width :number|string

The width field indicates the width value or a format-expression that defines the width of the clipping region relative to the layer, which corresponds to the [clip.width] flag used in layers field. The left, top, height fields define the size and position of the clipping region relative to the layer, while the offsetX and offsetY fields can be used to shift the entire clipping region horizontally and vertically relative to the layer.

The expression supports the following keywords:

"value", indicates the value field if defined or the Gauge.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 field to "value", it means that the width of the clipping region is determined by the clip's value or the Gauge.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 field is null, which means that it is not set and does not affect the size of the clipping region.

The width field is mapped to the LayerClip.Width property, which means that the following statements are equivalent:

oClip.Options = {width: "value"}
oClip.SetOptions({width: "value"})
oClip.Width = "value"
oClip.SetWidth("value")
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 Gauge.Value property
width