GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / DrawRotatedFilledRectangle Method / DrawRotatedFilledRectangle(Int32,Single,Single,Single,Single,Single,Int32,Boolean) Method
GdPicture image identifier.
Angle of rotation in degrees.
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 ARGBI() method.
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
DrawRotatedFilledRectangle(Int32,Single,Single,Single,Single,Single,Int32,Boolean) Method
In This Topic
Draws a rotated and filled rectangle on a GdPicture image. The filling color is specified with an integer value.
Syntax
'Declaration
 
Public Overloads Function DrawRotatedFilledRectangle( _
   ByVal ImageID As Integer, _
   ByVal Angle As Single, _
   ByVal DstLeft As Single, _
   ByVal DstTop As Single, _
   ByVal Width As Single, _
   ByVal Height As Single, _
   ByVal FillColor As Integer, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawRotatedFilledRectangle( 
   int ImageID,
   float Angle,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   int FillColor,
   bool AntiAlias
)
public function DrawRotatedFilledRectangle( 
    ImageID: Integer;
    Angle: Single;
    DstLeft: Single;
    DstTop: Single;
    Width: Single;
    Height: Single;
    FillColor: Integer;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawRotatedFilledRectangle( 
   ImageID : int,
   Angle : float,
   DstLeft : float,
   DstTop : float,
   Width : float,
   Height : float,
   FillColor : int,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawRotatedFilledRectangle( 
   int ImageID,
   float Angle,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   int FillColor,
   bool AntiAlias
) 
public:
GdPictureStatus DrawRotatedFilledRectangle( 
   int ImageID,
   float Angle,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   int FillColor,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture image identifier.
Angle
Angle of rotation in degrees.
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.
FillColor
Color of the filled rectangle. A suitable color value can be obtained by using the ARGBI() method.
AntiAlias
Set to True to apply the Antialiasing algorithm else False.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

This method requires the Image Documents component to run.

Example
Filling a rotated rectangle on a GdPicture image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int left = 50, top = 100, width = 250, height = 150;
    float angle = 30.0f;
    int fillColor = gdpictureImaging.ARGBI(255, 255, 192, 203); // Pink color.
    int imageID = gdpictureImaging.CreateNewGdPictureImage(400, 400, System.Drawing.Imaging.PixelFormat.Format24bppRgb, gdpictureImaging.ARGBI(0, 0, 0, 0));
 
    // Fill the rotated rectangle. The AntiAlias parameter is set to true to apply antialiasing algorithm, i.e. to improve the appearance of the rectangle boundary.
    gdpictureImaging.DrawRotatedFilledRectangle(imageID, angle, left, top, width, height, fillColor, true);
 
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also