GdPicture.NET Reference Guide
DrawRoundedRectangle Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : DrawRoundedRectangle 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.
Size of the radius in pixel.
The width, in pixel, of the pen used to draw the rectangle.
Color of the rectangle. A suitable color value can be obtained by using the ARGB() method.
Set to True to apply the Antialiasing algorithm else False.
Draws a rounded rectangle on a GdPicture image.
Syntax
'Declaration
 
Public Function DrawRoundedRectangle( _
   ByVal ImageID As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal Width As Integer, _
   ByVal Height As Integer, _
   ByVal Radius As Single, _
   ByVal PenWidth As Integer, _
   ByVal PenColor As Color, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public function DrawRoundedRectangle( 
   ImageID : int,
   DstLeft : int,
   DstTop : int,
   Width : int,
   Height : int,
   Radius : float,
   PenWidth : int,
   PenColor : Color,
   AntiAlias : boolean
) : 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.
Width
Specifies the width of the rectangle.
Height
Specifies the height of the rectangle.
Radius
Size of the radius in pixel.
PenWidth
The width, in pixel, of the pen used to draw the rectangle.
PenColor
Color of the rectangle. A suitable color value can be obtained by using the ARGB() method.
AntiAlias
Set to True to apply the Antialiasing algorithm else False.

Return Value

A member of the GdPictureStatus enumeration.
Example
Drawing a rounded rectangle on the image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   oGdPictureImaging.DrawRoundedRectangle(ImageID, 50, 50, 50, 100, 30.0, oGdPictureImaging.ARGB(255,0,0,0), True)
   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