CanvasRenderingContext2DSettings Class

The options of the rendering contexts of a canvas (https://html.spec.whatwg.org/multipage/canvas.html#canvasrenderingcontext2dsettings): the second argument of getContext(). The bitmaprenderer contexts only use CanvasRenderingContext2DSettings.Alpha (https://html.spec.whatwg.org/multipage/canvas.html#imagebitmaprenderingcontextsettings).

public sealed class CanvasRenderingContext2DSettings

Constructors

NameDescription
CanvasRenderingContext2DSettings()

CanvasRenderingContext2DSettings()

CanvasTypes.cs
public CanvasRenderingContext2DSettings()

No documentation is available.

Properties

NameDescription
AlphaGets whether the canvas has an alpha channel (an opaque canvas is initially opaque black).
ColorSpaceGets the color space of the bitmap.
ColorTypeGets the type of the components of the pixels.
DesynchronizedGets whether the canvas may be presented without synchronization with the event loop (no effect on the drawing).
WillReadFrequentlyGets whether the pixels will be read often (a hint to keep the bitmap in memory).

Gets whether the canvas has an alpha channel (an opaque canvas is initially opaque black).

public bool Alpha { get; init; }

ColorSpace

CanvasTypes.cs

Gets the type of the components of the pixels.

public CanvasColorType ColorType { get; init; }

Desynchronized

CanvasTypes.cs

Gets whether the canvas may be presented without synchronization with the event loop (no effect on the drawing).

public bool Desynchronized { get; init; }

WillReadFrequently

CanvasTypes.cs

Gets whether the pixels will be read often (a hint to keep the bitmap in memory).

public bool WillReadFrequently { get; init; }