[]
        
(Showing Draft Content)

C1.Pdf.C1PdfDocument.DrawImage

DrawImage Method

DrawImage(Image, RectangleF, ContentAlignment, ImageSizeMode)

Draws the specified GrapeCity.Documents.Drawing.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, ImageSizeMode mode)
Parameters
Type Name Description
Image img

GrapeCity.Documents.Drawing.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.

ImageSizeMode mode

ImageSizeMode value that specifies how the image should be sized to fit the rectangle.

Implements

DrawImage(Image, RectangleF)

Draws the specified GrapeCity.Documents.Drawing.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

GrapeCity.Documents.Drawing.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.

Implements
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 GrapeCity.Documents.Drawing.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

GrapeCity.Documents.Drawing.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.

Implements