You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Drawing (Shapes) > DrawRectangle Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.DrawRectangle Method

Draws a rectangle on a GdPicture image.

C#
public GdPictureStatus DrawRectangle(
    int ImageID, 
    int DstLeft, 
    int DstTop, 
    int Width, 
    int Height, 
    int PenWidth, 
    Color PenColor, 
    Boolean AntiAlias
);
Visual Basic
Public Function DrawRectangle(
    ByVal ImageID As Integer, 
    ByVal DstLeft As Integer, 
    ByVal DstTop As Integer, 
    ByVal Width As Integer, 
    ByVal Height As Integer, 
    ByVal PenWidth As Integer, 
    ByVal PenColor As Color, 
    ByVal AntiAlias As Boolean
) As GdPictureStatus
Parameters
Parameters 
Description 
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.  
PenWidth 
The width in pixel of the pen used to draw the rectangle.  
PenColor 
Color Object. You can build a Color Object using the ARGB() function. Color used to draw the rectangle.  
AntiAlias 
Set to True to apply the Antialiasing algorithm else False.  
Returns

A member of the GdPictureStatus enumeration.

Draws a Semi transparent Green rectangle using 2 pixels pen size from (0,0) to (200,200)

oGdPictureImaging.DrawRectangle(ImageID, 0, 0, 200, 200, 2, oGdPictureImaging.ARGB(125, 0, 255, 0), True)
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.