Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IHTMLCanvasElement interface

Provides an interface to implement methods and properties for drawing, rendering, and manipulating images and graphics on a webpage.

Members

The IHTMLCanvasElement interface inherits from the IDispatch interface. IHTMLCanvasElement also has these types of members:

Methods

The IHTMLCanvasElement interface has these methods.

MethodDescription
getContext

Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.

toDataURL

Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element (such as img).

 

Properties

The IHTMLCanvasElement interface has these properties.

PropertyAccess typeDescription

height

Read/write

Gets or sets the height of a canvas element on a document.

width

Read/write

Gets or sets the width of a canvas element on a document.

 

Requirements

Minimum supported client

Windows Vista with SP1, Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch

 

 

Show:
© 2017 Microsoft