[]
Draws the specified Image object at the specified location,
adjusting the image size as specified by the align and
mode parameters.
public void DrawImage(Image img, RectangleF rc, ContentAlignment align, ImageSizeModeEnum mode)
Public Sub DrawImage(img As Image, rc As RectangleF, align As ContentAlignment, mode As ImageSizeModeEnum)
| Type | Name | Description |
|---|---|---|
| Image | img | Image object to draw. |
| RectangleF | rc | RectangleF structure that specifies the location of the drawn image, in points from the top left corner of the page. |
| ContentAlignment | align | ContentAlignment value that specifies how the image should be aligned within the rectangle. |
| ImageSizeModeEnum | mode | ImageSizeModeEnum value that specifies how the image should be sized to fit the rectangle. |
Draws the specified Image object at the specified location, stretching it to fit the destination rectangle.
public void DrawImage(Image img, RectangleF rc)
Public Sub DrawImage(img As Image, rc As RectangleF)
| Type | Name | Description |
|---|---|---|
| Image | img | Image object to draw. |
| RectangleF | rc | RectangleF structure that specifies the location of the drawn image, in points from the top left corner of the page. |
The DrawImage method can be used to render bitmaps and metafiles. When used with metafiles, it enumerates the drawing commands in the metafile and translates them into low-level drawing primitives. This results in resolution-independent images.
Draws the specified Image object at the specified location, clipping the output to the given clipping rectangle.
public void DrawImage(Image img, RectangleF rcImage, RectangleF rcClip)
Public Sub DrawImage(img As Image, rcImage As RectangleF, rcClip As RectangleF)
| Type | Name | Description |
|---|---|---|
| Image | img | Image object to draw. |
| RectangleF | rcImage | RectangleF structure that specifies the location of the drawn image, in points from the top left corner of the page. |
| RectangleF | rcClip | RectangleF structure that specifies a clipping rectangle on the page. No part of the image is drawn outside the clipping rectangle. |