Search
GdiGraphics.DrawImage Method (Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit, ImageAttributes, Graphics.DrawImageAbort, IntPtr)
See Also
 





Draws the specified portion of the specified .NET Image object at the specified location and with the specified size.

Namespace: MindFusion.Drawing
Package: MindFusion.Common

 Syntax

C#  Copy Code

public void DrawImage (
    Image image,
    Rectangle destRect,
    int srcX,
    int srcY,
    int srcWidth,
    int srcHeight,
    GraphicsUnit srcUnit,
    ImageAttributes imageAttrs,
    Graphics.DrawImageAbort callback,
    IntPtr callbackData
)

Visual Basic  Copy Code

Public Sub DrawImage( _
    image As Image, _
    destRect As Rectangle, _
    srcX As Integer, _
    srcY As Integer, _
    srcWidth As Integer, _
    srcHeight As Integer, _
    srcUnit As GraphicsUnit, _
    imageAttrs As ImageAttributes, _
    callback As Graphics.DrawImageAbort, _
    callbackData As IntPtr _
)

 Parameters

image
A .NET Image object to draw.
destRect
A .NET Rectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcX
The x-coordinate of the upper-left corner of the portion of the source image to draw.
srcY
The y-coordinate of the upper-left corner of the portion of the source image to draw.
srcWidth
The width of the portion of the source image to draw.
srcHeight
The height of the portion of the source image to draw.
srcUnit
Member of the .NET GraphicsUnit enumeration that specifies the units of measure used to determine the source rectangle.
imageAttrs
A .NET ImageAttributes object that specifies recoloring and gamma information for the image object.
callback
A .NET Graphics.DrawImageAbort delegate that specifies a method to call during the drawing of the image. This method is called frequently to check whether to stop execution of the DrawImage method according to application-determined criteria.
callbackData
Value specifying additional data for the DrawImageAbort delegate to use when checking whether to stop execution of the DrawImage method.

 See Also