GdPicture.NET Reference Guide
DrawFilledRectangleOP Method
Example 





GdPicture14 Namespace > GdPictureImaging Class : DrawFilledRectangleOP Method
GdPicture Image Identifier.
Specifies the x-coordinate of the upper-left corner of the rectangle.
Specifies the y-coordinate of the upper-left corner of the rectangle.
Specifies the width of the rectangle.
Specifies the height of the rectangle.
Color of the filled rectangle. A suitable color value can be obtained by using the ARGB() method.
A member of the Operators enumeration.
Draws a filled rectangle on a GdPicture image using an operator of combination.
Syntax
'Declaration
 
Public Function DrawFilledRectangleOP( _
   ByVal ImageID As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal DstWidth As Integer, _
   ByVal DstHeight As Integer, _
   ByVal FillColor As Color, _
   ByVal OP As Operators _
) As GdPictureStatus
public function DrawFilledRectangleOP( 
   ImageID : int,
   DstLeft : int,
   DstTop : int,
   DstWidth : int,
   DstHeight : int,
   FillColor : Color,
   OP : Operators
) : GdPictureStatus;

Parameters

ImageID
GdPicture Image Identifier.
DstLeft
Specifies the x-coordinate of the upper-left corner of the rectangle.
DstTop
Specifies the y-coordinate of the upper-left corner of the rectangle.
DstWidth
Specifies the width of the rectangle.
DstHeight
Specifies the height of the rectangle.
FillColor
Color of the filled rectangle. A suitable color value can be obtained by using the ARGB() method.
OP
A member of the Operators enumeration.

Return Value

A member of the GdPictureStatus enumeration.
Example
Drawing a filled rectangle on the image using Multiply operator.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   oGdPictureImaging.DrawFilledRectangleOP(ImageID, 50, 50, 50, 100, oGdPictureImaging.ARGB(255,255,255,0), Operators.OperatorMultiply)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
ARGB(Byte,Byte,Byte) Method