[]
        
(Showing Draft Content)

C1.C1Pdf.C1PdfDocument.DrawImage

DrawImage Method

DrawImage(Image, RectangleF, ContentAlignment, ImageSizeModeEnum)

Draws the specified Image object at the specified location, adjusting the image size as specified by the align and mode parameters.

Declaration
public void DrawImage(Image img, RectangleF rc, ContentAlignment align, ImageSizeModeEnum mode)
Parameters
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.

DrawImage(Image, RectangleF)

Draws the specified Image object at the specified location, stretching it to fit the destination rectangle.

Declaration
public void DrawImage(Image img, RectangleF rc)
Parameters
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.

Remarks

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.

DrawImage(Image, RectangleF, RectangleF)

Draws the specified Image object at the specified location, clipping the output to the given clipping rectangle.

Declaration
public void DrawImage(Image img, RectangleF rcImage, RectangleF rcClip)
Parameters
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.