Class DrawingContext

Namespace
Forma
Assembly
Forma.dll

Backend-neutral retained drawing operations exposed by the active UI renderer.

public sealed class DrawingContext
Inheritance
DrawingContext
Inherited Members

Methods

Clip(DrawingPath, Matrix, FillRule, float)

Intersects subsequent meshes with one transformed geometry path using the selected winding rule.

public void Clip(DrawingPath path, Matrix transform, FillRule fillRule, float tolerance = 0.25)

Parameters

path DrawingPath
transform Matrix
fillRule FillRule
tolerance float

Clip(DrawingPath, Matrix, float)

Intersects subsequent meshes with one transformed geometry path.

public void Clip(DrawingPath path, Matrix transform, float tolerance = 0.25)

Parameters

path DrawingPath
transform Matrix
tolerance float

FillPath(DrawingPath, Brush, Rectangle, Matrix, FillRule, float)

Fills a transformed path using the selected winding rule.

public void FillPath(DrawingPath path, Brush brush, Rectangle brushBounds, Matrix transform, FillRule fillRule, float tolerance = 0.25)

Parameters

path DrawingPath
brush Brush
brushBounds Rectangle
transform Matrix
fillRule FillRule
tolerance float

FillPath(DrawingPath, Brush, Rectangle, Matrix, float)

Fills a transformed simple path with a backend-neutral brush.

public void FillPath(DrawingPath path, Brush brush, Rectangle brushBounds, Matrix transform, float tolerance = 0.25)

Parameters

path DrawingPath
brush Brush
brushBounds Rectangle
transform Matrix
tolerance float

FillPath(DrawingPath, Color, Matrix, float)

Fills a transformed simple path with a solid color.

public void FillPath(DrawingPath path, Color color, Matrix transform, float tolerance = 0.25)

Parameters

path DrawingPath
color Color
transform Matrix
tolerance float

FillPath(DrawingPath, Color, float)

Fills a simple path with a solid color.

public void FillPath(DrawingPath path, Color color, float tolerance = 0.25)

Parameters

path DrawingPath
color Color
tolerance float

MultiplyOpacity(float)

Multiplies subsequent drawing opacity within the current saved state.

public void MultiplyOpacity(float opacity)

Parameters

opacity float

Restore()

Restores the most recently saved drawing state.

public void Restore()

Save()

Saves the current drawing state.

public void Save()

SetEffect(DrawingColorMatrixEffect)

Applies one bounded color-matrix effect to subsequent drawing.

public void SetEffect(DrawingColorMatrixEffect effect)

Parameters

effect DrawingColorMatrixEffect

SetOpacityMask(Brush, Rectangle)

Multiplies subsequent vertex alpha by a retained brush mask sampled in the supplied bounds.

public void SetOpacityMask(Brush mask, Rectangle bounds)

Parameters

mask Brush
bounds Rectangle

SetOpacityMask(DrawingLinearGradient)

Multiplies subsequent vertex alpha by a linear brush mask.

public void SetOpacityMask(DrawingLinearGradient mask)

Parameters

mask DrawingLinearGradient

StrokePath(DrawingPath, Brush, Rectangle, float, Matrix, StrokeStyle, float)

Strokes a transformed path with bounded cap, join, dash, and alignment semantics.

public void StrokePath(DrawingPath path, Brush brush, Rectangle brushBounds, float thickness, Matrix transform, StrokeStyle style, float tolerance = 0.25)

Parameters

path DrawingPath
brush Brush
brushBounds Rectangle
thickness float
transform Matrix
style StrokeStyle
tolerance float

StrokePath(DrawingPath, Brush, Rectangle, float, Matrix, float)

Strokes a transformed path with a backend-neutral brush.

public void StrokePath(DrawingPath path, Brush brush, Rectangle brushBounds, float thickness, Matrix transform, float tolerance = 0.25)

Parameters

path DrawingPath
brush Brush
brushBounds Rectangle
thickness float
transform Matrix
tolerance float

StrokePath(DrawingPath, DrawingLinearGradient, float, Matrix, float)

Strokes a transformed path with a linear gradient.

public void StrokePath(DrawingPath path, DrawingLinearGradient gradient, float thickness, Matrix transform, float tolerance = 0.25)

Parameters

path DrawingPath
gradient DrawingLinearGradient
thickness float
transform Matrix
tolerance float