GdPicture.NET Reference Guide
DrawGdPictureImageOPRect Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : DrawGdPictureImageOPRect 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.
Specifies the x-coordinate in pixels of the upper-left corner of the portion of the source image to be drawn.
Specifies the y-coordinate in pixels of the upper-left corner of the portion of the source image to be drawn.
Specifies the width, in pixels, of the portion of the source image to be drawn.
Specifies the height, in pixels, of the portion of the source image to be drawn.
A member of the Operators enumeration.
A member of the Drawing2D.InterPolationMode enumeration.
Draws a portion of a GdPicture image into another GdPicture image using an operator of combination.
Syntax
'Declaration
 
Public Function DrawGdPictureImageOPRect( _
   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 SrcLeft As Integer, _
   ByVal SrcTop As Integer, _
   ByVal SrcWidth As Integer, _
   ByVal SrcHeight As Integer, _
   ByVal Op As Operators, _
   ByVal InterpolationMode As InterpolationMode _
) As GdPictureStatus

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.
SrcLeft
Specifies the x-coordinate in pixels of the upper-left corner of the portion of the source image to be drawn.
SrcTop
Specifies the y-coordinate in pixels of the upper-left corner of the portion of the source image to be drawn.
SrcWidth
Specifies the width, in pixels, of the portion of the source image to be drawn.
SrcHeight
Specifies the height, in pixels, of the portion of the source image to be drawn.
Op
A member of the Operators enumeration.
InterpolationMode
A member of the Drawing2D.InterPolationMode enumeration.

Return Value

A member of the GdPictureStatus enumeration.
Example
Copying a section of one image onto a section of another using OP operation AND and specifying both the source and destination rectangles.
Dim oGdPictureImaging As New GdPictureImaging
Dim SrcImage As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("srcImg.png")
Dim DstImage As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("dstImg.png")
oGdPictureImaging.DrawGdPictureImageOPRect(SrcImage, DstImage, 0, 0, 200, 200, 0, 0, 100, 100, Operators.OperatorAnd, System.Drawing.Drawing2D.InterpolationMode.Bicubic)
oGdPictureImaging.SaveAsPNG(DstImage, "output.png")
oGdPictureImaging.ReleaseGdPictureImage(DstImage)
oGdPictureImaging.ReleaseGdPictureImage(SrcImage)
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members