GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / DrawRotatedEllipse Method / DrawRotatedEllipse(Int32,Single,Single,Single,Single,Single,Single,GdPictureColor,Boolean) Method
GdPicture image identifier.
Angle of rotation in degrees.
Specifies the x-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
Specifies the y-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
Specifies the width of the rectangle that bounds the ellipse.
Specifies the height of the rectangle that bounds the ellipse.
Width, in pixel, of the pen used to draw the rectangle.
Color of the ellipse. A suitable color value can be obtained by using the ARGB() method.
Set to True to apply the Antialiasing algorithm else False.
Example





In This Topic
DrawRotatedEllipse(Int32,Single,Single,Single,Single,Single,Single,GdPictureColor,Boolean) Method
In This Topic
Draws a rotated ellipse on a GdPicture image.
Syntax
'Declaration
 
Public Overloads Function DrawRotatedEllipse( _
   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 PenWidth As Single, _
   ByVal PenColor As GdPictureColor, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawRotatedEllipse( 
   int ImageID,
   float Angle,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   float PenWidth,
   GdPictureColor PenColor,
   bool AntiAlias
)
public function DrawRotatedEllipse( 
    ImageID: Integer;
    Angle: Single;
    DstLeft: Single;
    DstTop: Single;
    Width: Single;
    Height: Single;
    PenWidth: Single;
    PenColor: GdPictureColor;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawRotatedEllipse( 
   ImageID : int,
   Angle : float,
   DstLeft : float,
   DstTop : float,
   Width : float,
   Height : float,
   PenWidth : float,
   PenColor : GdPictureColor,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawRotatedEllipse( 
   int ImageID,
   float Angle,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   float PenWidth,
   GdPictureColor PenColor,
   bool AntiAlias
) 
public:
GdPictureStatus DrawRotatedEllipse( 
   int ImageID,
   float Angle,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   float PenWidth,
   GdPictureColor PenColor,
   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 that bounds the ellipse.
DstTop
Specifies the y-coordinate of the upper-left corner of the rectangle that bounds the ellipse.
Width
Specifies the width of the rectangle that bounds the ellipse.
Height
Specifies the height of the rectangle that bounds the ellipse.
PenWidth
Width, in pixel, of the pen used to draw the rectangle.
PenColor
Color of the ellipse. 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 rotated ellipse on a GdPicture image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int left = 50, top = 100, width = 250, height = 150;
    float angle = 30.0f;
    int penWidth = 10;
    Color penColor = gdpictureImaging.ARGB(255, 0, 0, 255);
    int imageID = gdpictureImaging.CreateNewGdPictureImage(400, 400, System.Drawing.Imaging.PixelFormat.Format24bppRgb, gdpictureImaging.ARGB(0, 0, 0, 0));
 
    // Draw the rotated ellipse. The AntiAlias parameter is set to true to apply antialiasing algorithm, i.e. to improve the appearance of the ellipse boundary.
    gdpictureImaging.DrawRotatedEllipse(imageID, angle, left, top, width, height, penWidth, penColor, true);
 
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
 
    // Release used resources.
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also