Skip to content
ChartForgeX
Class

VisualMask

ChartForgeX.Effects

Namespace
ChartForgeX.Effects
Assembly
ChartForgeX
Modifiers
sealed

An immutable fixed-density mask snapshot in the original child's logical coordinates.

Inheritance

  • object
  • VisualMask

Remarks

Masking changes alpha once and retains unassociated source RGB wherever output alpha is nonzero. Samples must share the layer's density and device grid. Outside these bounds coverage is zero. Native luminance uses sRGB; SVG source masks resolve their own computed color-interpolation separately.

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

public VisualMask(RgbaImage image, ChartPoint origin = default, int pixelsPerUnit = 1, VisualMaskMode mode = Alpha, bool orderedDither = true) #

Copies the required RGBA pixels after validating the complete borrowed allocation and snapshot budget.

Parameters

image ChartForgeX.Raster.RgbaImage required
Borrowed RGBA image; its required pixels are copied, never retained by reference.
origin ChartForgeX.Primitives.ChartPoint = default optional
Mask's top-left in original child coordinates, aligned to the selected device grid.
pixelsPerUnit int = 1 optional
Positive device samples per logical unit.
mode ChartForgeX.Effects.VisualMaskMode = Alpha optional
Alpha alone, or sRGB luminance multiplied by mask alpha.
orderedDither bool = true optional
Uses the existing deterministic Bayer phase for final alpha only.

Methods

public RgbaImage ToImage() #

Returns a caller-owned mutable pixel copy. Repeated exports are outside the original operation's pixel budget.

Returns

RgbaImage

Properties

public ChartRect Bounds { get; } #

Gets the finite mask coverage bounds in original child logical coordinates.

public int PixelsPerUnit { get; } #

Gets the mask's device density.

public VisualMaskMode Mode { get; } #

Gets the selected mask channel policy.

public bool OrderedDither { get; } #

Gets whether only final alpha quantization uses ordered dither.