ICanvasRenderingContext2DDrawImage Method (HTMLImageElement, Double, Double, Double, Double, Double, Double, Double, Double)
Draws the specified image.

Namespace: Aspose.Html.Dom.Canvas
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 21.3
Syntax
void DrawImage(
	HTMLImageElement image,
	double sx,
	double sy,
	double sw,
	double sh,
	double dx,
	double dy,
	double dw,
	double dh
)

Parameters

image
Type: Aspose.HtmlHTMLImageElement
The HTMLImageElement to draw into the context.
sx
Type: SystemDouble
The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
sy
Type: SystemDouble
The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.
sw
Type: SystemDouble
The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.
sh
Type: SystemDouble
The height of the sub-rectangle of the source image to draw into the destination context.
dx
Type: SystemDouble
The X coordinate in the destination canvas at which to place the top-left corner of the source image.
dy
Type: SystemDouble
The Y coordinate in the destination canvas at which to place the top-left corner of the source image.
dw
Type: SystemDouble
The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.
dh
Type: SystemDouble
The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.
See Also