Graphics.DrawImage Method (Pipeline, RectangleF)

Draws an image produced by a pipeline on the Graphics.

Namespace: Aurigma.GraphicsMill.AdvancedDrawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)


public void DrawImage(
	Pipeline pipeline,
	RectangleF dstRect



Type: Aurigma.GraphicsMill.Pipeline

A Pipeline producing image to draw.

Type: System.Drawing.RectangleF

A RectangleF structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.


The image is drawn to destination rectangle on this Graphics. If the current image dimensions differ from dimensions of the destination rectangle, the image will be resized to have the same size as the destination rectangle.

If you want this method to calculate width and/or height automatically, you can pass 0s as the dstRect rectangle dimensions. The image dimensions will be calculated with the following way:

  1. If both width and heigth are 0, the source image dimensions will be taken. This way the image will not be resized during drawing.
  2. If only one of arguments is 0, this argument will be calculated as to save image proportion. For example, the source image is 800x600, and you pass 400 as width and 0 as height. Height will be calculated to preserve aspect ratio of the image, i.e. it will be 300.

See Also