PdfGraphics.DrawImage(Image, RectangleF, RectangleF, GraphicsUnit) Method
Draws the portion of the specified Image at the specified location in the specified size.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v19.1.Drawing.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
image | Image | An Image object that specifies the image to draw. |
destRect | RectangleF | A RectangleF structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle. |
srcRect | RectangleF | A RectangleF structure that specifies the portion of the image object to draw. |
srcUnit | GraphicsUnit | A GraphicsUnit enumeration that is the units of measure used by the srcRect parameter. |
Remarks
This method renders an image with its original resolution (DPI).
To add an image to the page, you need to call one of the PdfGraphics.AddToPageForeground, PdfGraphics.AddToPageBackground, and PdfDocumentProcessor.RenderNewPage overload methods. Note that these methods accept DPI values as arguments.
The DPI values do not affect image quality and are used for coordinate transformation only (world coordinates to page coordinates). See the Coordinate Systems topic to learn more about the coordinate transformations.
Important
The PdfGraphics will produce vector graphics for the EMF+ metafiles only. If a metafile contains not only GDI+ commands, it will be rasterized and rendered as a bitmap.