AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.2.9" />

.NET API 451,072 bytes

 HTMLCanvasElement

public sealed class HTMLCanvasElement : HTMLElement
Represents the HTML canvas element.
public uint Height { get; set; }

Gets or sets the displayed height of the canvas element.

public uint Width { get; set; }

Gets or sets the displayed width of the canvas element.

public RenderingContext GetContext(string contextId)

Gets the drawing context.

public void SetContext(RenderingContext context)

Changes the context the element is related to the given one.

public bool SupportsContext(string contextId)

Gets an indicator if a context with the given parameters could be created.

public void ToBlob(Action<object> callback, string type = null)

Creates a BLOB out of the canvas pixel data and passes it to the given callback.

public string ToDataURL(string type = null)

Returns a Data URI with the bitmap data of the context.