Class MaskEffect2DMetadata

Defines properties and message types for MaskEffect2D.

Inherits properties and message types from NodeEffect2DMetadata.

Property Types

See also PropertyType
MaskEffect2DMetadata.MaskProperty

Sets the mask texture. The default is no texture.

MaskEffect2DMetadata.WidthProperty

Sets the width of the mask to use in a layout. This value overrides the width of the texture that you use as the mask.

MaskEffect2DMetadata.HeightProperty

Sets the height of the mask to use in a layout. This value overrides the height of the texture that you use as the mask.

MaskEffect2DMetadata.HorizontalAlignmentProperty

Sets the horizontal alignment of the mask effect:

  • Left aligns the left edge of the mask with the left edge of the node. This is the default.
  • Right aligns the right edge of the mask with the right edge of the node.
  • Center aligns the mask horizontally to the center of the node.
  • Stretch stretches the mask horizontally to fit the node from the left edge to the right edge.
MaskEffect2DMetadata.VerticalAlignmentProperty

Sets the vertical alignment of the mask effect:

  • Bottom aligns the bottom edge of the mask with the bottom edge of the node.
  • Top aligns the top edge of the mask with the top edge of the node. This is the default.
  • Center aligns the mask vertically to the center of the node.
  • Stretch stretches the mask vertically to fit the node from the top edge to the bottom edge.
MaskEffect2DMetadata.OffsetProperty

Sets the mask offset along the X and Y axes in pixels. Kanzi applies the mask offset after stretch, alignment, and scale.

MaskEffect2DMetadata.ScaleProperty

Sets the factor by which to scale the mask. Kanzi applies the scale after stretch and alignment.

MaskEffect2DMetadata.ScreenSpaceProperty

Whether to layout the mask relative to the screen instead of the node.

MaskEffect2DMetadata.StretchProperty

Sets the stretch mode of the mask effect:

  • None disables stretching. This is the default.
  • Fill stretches the mask to fill the node.
  • Uniform stretches the mask using uniform scaling to fill the node in either vertical or horizontal direction, whichever requires smaller scale.
  • Uniform To Fill stretches the mask using uniform scaling to fill the node in either vertical or horizontal direction, whichever requires larger scale.
  • Repeat does not stretch the mask, and allows the mask to repeat outside of its area based on the mask texture wrap mode.
MaskEffect2DMetadata.ChannelProperty

Sets the texture channel to use as the input for the mask:

  • Alpha uses the alpha channel from the texture. This is the default.
  • Red uses the red color channel from the texture.
  • Green uses the green color channel from the texture.
  • Blue uses the blue color channel from the texture.
  • Luminance uses the luminance calculated from the red, green, and blue channels.
MaskEffect2DMetadata.InvertProperty

Whether to invert the mask so that transparent areas become opaque and opaque areas become transparent.

MaskEffect2DMetadata.StrengthProperty

Sets the strength of the mask effect in the range from 0 to 1:

  • 0 disables the mask effect.
  • 1 applies the mask at full strength. This is the default.
  • Any value between 0 and 1 partially applies the mask as if the non-masked result was blended with the fully masked version.

Message Types

See also MessageType

Message Arguments

Message arguments classes define message arguments used for different message types. Each class defines a number of property types - arguments - together with getter and setter functions for them.