AngleSharp by AngleSharp

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

.NET API 1,232,384 bytes

 IHtmlCanvasElement

Represents the canvas HTML element.
int Height { get; set; }

Gets or sets the pixel height of the canvas element.

int Width { get; set; }

Gets or sets the pixel width of the canvas element.

IRenderingContext GetContext(string contextId)

Gets the drawing context.

bool IsSupportingContext(string contextId)

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

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

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

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

string ToDataUrl(string type = null)

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