
## draw_image {#aspose.html.HTMLImageElement-float-float}

Draws the specified image.



```python
def draw_image(self, image, dx, dy):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| image | [`HTMLImageElement`](/html/python-net/aspose.html/htmlimageelement) | The HTMLImageElement to draw into the context. |
| dx | float | The X coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dy | float | The Y coordinate in the destination canvas at which to place the top-left corner of the source image. |


## draw_image {#aspose.html.HTMLCanvasElement-float-float}

Draws the specified image.



```python
def draw_image(self, image, dx, dy):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| image | [`HTMLCanvasElement`](/html/python-net/aspose.html/htmlcanvaselement) | The HTMLCanvasElement to draw into the context. |
| dx | float | The X coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dy | float | The Y coordinate in the destination canvas at which to place the top-left corner of the source image. |


## draw_image {#aspose.html.HTMLImageElement-float-float-float-float}

Draws the specified image.



```python
def draw_image(self, image, dx, dy, dw, dh):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| image | [`HTMLImageElement`](/html/python-net/aspose.html/htmlimageelement) | The HTMLImageElement to draw into the context. |
| dx | float | The X coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dy | float | The Y coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dw | float | 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 | float | 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. |


## draw_image {#aspose.html.HTMLCanvasElement-float-float-float-float}

Draws the specified image.



```python
def draw_image(self, image, dx, dy, dw, dh):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| image | [`HTMLCanvasElement`](/html/python-net/aspose.html/htmlcanvaselement) | The HTMLCanvasElement to draw into the context. |
| dx | float | The X coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dy | float | The Y coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dw | float | 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 | float | 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. |


## draw_image {#aspose.html.HTMLImageElement-float-float-float-float-float-float-float-float}

Draws the specified image.



```python
def draw_image(self, image, sx, sy, sw, sh, dx, dy, dw, dh):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| image | [`HTMLImageElement`](/html/python-net/aspose.html/htmlimageelement) | The HTMLImageElement to draw into the context. |
| sx | float | The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. |
| sy | float | The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. |
| sw | float | 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 | float | The height of the sub-rectangle of the source image to draw into the destination context. |
| dx | float | The X coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dy | float | The Y coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dw | float | 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 | float | 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. |


## draw_image {#aspose.html.HTMLCanvasElement-float-float-float-float-float-float-float-float}

Draws the specified image.



```python
def draw_image(self, image, sx, sy, sw, sh, dx, dy, dw, dh):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| image | [`HTMLCanvasElement`](/html/python-net/aspose.html/htmlcanvaselement) | The HTMLCanvasElement to draw into the context. |
| sx | float | The X coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. |
| sy | float | The Y coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context. |
| sw | float | 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 | float | The height of the sub-rectangle of the source image to draw into the destination context. |
| dx | float | The X coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dy | float | The Y coordinate in the destination canvas at which to place the top-left corner of the source image. |
| dw | float | 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 | float | 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
* module [`aspose.html.dom.canvas`](../../)
* class [`ICanvasRenderingContext2D`](/html/python-net/aspose.html.dom.canvas/icanvasrenderingcontext2d)
