GdPicture.NET Reference Guide
DrawGdPictureImage Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : DrawGdPictureImage Method
GdPicture image identifier. Specifies the image to be drawn from.
GdPicture image identifier. specifies the image to draw to.
Specifies the x-coordinate in pixels of the upper-left corner of the destination rectangle at which to draw the image.
Specifies the y-coordinate in pixels of the upper-left corner of the destination rectangle at which to draw the image.
Specifies the width, in pixels, of the destination rectangle at which to draw the image.
Specifies the height, in pixels, of the destination rectangle at which to draw the image.
A member of the Drawing2D.InterPolationMode enumeration.
Draws a GdPicture image into another GdPicture image.
Syntax
'Declaration
 
Public Function DrawGdPictureImage( _
   ByVal SrcImage As Integer, _
   ByVal DstImage As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal DstWidth As Integer, _
   ByVal DstHeight As Integer, _
   ByVal InterpolationMode As InterpolationMode _
) As GdPictureStatus
public GdPictureStatus DrawGdPictureImage( 
   int SrcImage,
   int DstImage,
   int DstLeft,
   int DstTop,
   int DstWidth,
   int DstHeight,
   InterpolationMode InterpolationMode
)
public function DrawGdPictureImage( 
    SrcImage: Integer;
    DstImage: Integer;
    DstLeft: Integer;
    DstTop: Integer;
    DstWidth: Integer;
    DstHeight: Integer;
    InterpolationMode: InterpolationMode
): GdPictureStatus; 
public function DrawGdPictureImage( 
   SrcImage : int,
   DstImage : int,
   DstLeft : int,
   DstTop : int,
   DstWidth : int,
   DstHeight : int,
   InterpolationMode : InterpolationMode
) : GdPictureStatus;
public: GdPictureStatus DrawGdPictureImage( 
   int SrcImage,
   int DstImage,
   int DstLeft,
   int DstTop,
   int DstWidth,
   int DstHeight,
   InterpolationMode InterpolationMode
) 
public:
GdPictureStatus DrawGdPictureImage( 
   int SrcImage,
   int DstImage,
   int DstLeft,
   int DstTop,
   int DstWidth,
   int DstHeight,
   InterpolationMode InterpolationMode
) 

Parameters

SrcImage
GdPicture image identifier. Specifies the image to be drawn from.
DstImage
GdPicture image identifier. specifies the image to draw to.
DstLeft
Specifies the x-coordinate in pixels of the upper-left corner of the destination rectangle at which to draw the image.
DstTop
Specifies the y-coordinate in pixels of the upper-left corner of the destination rectangle at which to draw the image.
DstWidth
Specifies the width, in pixels, of the destination rectangle at which to draw the image.
DstHeight
Specifies the height, in pixels, of the destination rectangle at which to draw the image.
InterpolationMode
A member of the Drawing2D.InterPolationMode enumeration.

Return Value

A member of the GdPictureStatus enumeration.
Example
Rendering an image with a circle onto the background image and saving the result into a png file.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    Color backColor = gdpictureImaging.ARGB(255, 0, 255, 0); // Green color
    Color circleColor = gdpictureImaging.ARGB(255, 255, 0, 0); // Red color
 
    // Create a background image.
    int backImage = gdpictureImaging.CreateNewGdPictureImage(320, 200, 32, backColor);
 
    // Create an image used for drawing, and draw a circle on it.
    int circleImage = gdpictureImaging.CreateNewGdPictureImage(80, 80, 32, gdpictureImaging.ARGB(0, 0, 0, 0));
    gdpictureImaging.DrawFilledCircle(circleImage, 40, 40, 60, circleColor, false);
 
    // Draw an image with a circle onto the background image.
    gdpictureImaging.DrawGdPictureImage(circleImage, backImage, 0, 0, 80, 80, System.Drawing.Drawing2D.InterpolationMode.Default);
    gdpictureImaging.SaveAsPNG(backImage, "output.png");
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(circleImage);
    gdpictureImaging.ReleaseGdPictureImage(backImage);
}
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
DrawGdPictureImageRect Method