Share via


CanvasState Class

Definition

Represents the state of a canvas, including transformation and stroke properties.

public ref class CanvasState : IDisposable
public class CanvasState : IDisposable
type CanvasState = class
    interface IDisposable
Public Class CanvasState
Implements IDisposable
Inheritance
CanvasState
Derived
Implements

Constructors

CanvasState()

Initializes a new instance of the CanvasState class.

CanvasState(CanvasState)

Initializes a new instance of the CanvasState class with properties from another canvas state.

Properties

Scale

Gets the uniform scale factor derived from the transformation matrix.

ScaleX

Gets the horizontal scale factor derived from the transformation matrix.

ScaleY

Gets the vertical scale factor derived from the transformation matrix.

StrokeDashOffset

Gets or sets the distance into the dash pattern to start the dash.

StrokeDashPattern

Gets or sets the pattern of dashes and gaps used to stroke paths.

StrokeSize

Gets or sets the width of the stroke used to draw an object's outline.

Transform

Gets or sets the transformation matrix for the canvas.

Methods

Dispose()

Releases resources used by the canvas state.

GetLengthScale(Matrix3x2)

Gets the scale factor for lengths based on the provided transformation matrix.

TransformChanged()

Called when the transformation matrix changes.

Applies to