Mask

class Mask(val content: GroupNode, val units: PaintUnits = PaintUnits.OBJECT, val region: Rectangle? = Rectangle(-0.1, -0.1, 1.2, 1.2), val regionUnits: PaintUnits = PaintUnits.BOUNDS, val type: MaskType = MaskType.LUMINANCE, val id: String = "")(source)

A mask, like SVG's mask: the alpha of what it is applied to is multiplied by the value of content, its luminance or its alpha by type. The content is in the coordinates of the node it is applied to, or in the bounds of that node when units is PaintUnits.BOUNDS; it is drawn in region, in the coordinates of regionUnits, or everywhere when the region is null.

Constructors

Link copied to clipboard
constructor(content: GroupNode, units: PaintUnits = PaintUnits.OBJECT, region: Rectangle? = Rectangle(-0.1, -0.1, 1.2, 1.2), regionUnits: PaintUnits = PaintUnits.BOUNDS, type: MaskType = MaskType.LUMINANCE, id: String = "")

Properties

Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
val region: Rectangle?
Link copied to clipboard
Link copied to clipboard

the id of the mask in SVG documents: id, or an id derived from the mask when it has none

Link copied to clipboard
Link copied to clipboard