DrawImage Method
DrawImage(ImageList, Int32, Rectangle)
When implemented by a class, draws specified image in the specified rectangular area.
Declaration
void DrawImage(ImageList images, int index, Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
ImageList | images | Image list that contains image to draw. |
Int32 | index | Index of image to draw within image list. |
Rectangle | rect | Rectangle that bounds the drawing area for the image. |
DrawImage(ImageList, Int32, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit, ImageAttributes)
When implemented by a class, draws specified image in the specified rectangular area.
Declaration
void DrawImage(ImageList images, int index, Rectangle rect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)
Parameters
Type | Name | Description |
---|---|---|
ImageList | images | Image list that contains image to draw. |
Int32 | index | Index of image to draw within image list. |
Rectangle | rect | Rectangle that bounds the drawing area for the image. |
Int32 | srcX | X-coordinate of the upper-left corner of the portion of the source image to be drawn. |
Int32 | srcY | Y-coordinate of the upper-left corner of the portion of the source image to be drawn. |
Int32 | srcWidth | Width of the portion of the source image to be drawn. |
Int32 | srcHeight | Height of the portion of the source image to be drawn. |
GraphicsUnit | srcUnit | Specifies the unit of measure for the image. |
ImageAttributes | imageAttr | Specifies the color and size attributes of the image to be drawn. |
DrawImage(Image, Rectangle)
When implemented by a class, draws image in the specified rectangular area.
Declaration
void DrawImage(Image image, Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
Image | image | Specifies image to draw. |
Rectangle | rect | Destination rectangle |