GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / DrawArc Method / DrawArc(Int32,Single,Single,Single,Single,Single,Single,Single,Int32,Boolean) Method
GdPicture image identifier.
Specifies the x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
Specifies the y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
Specifies the width of the ellipse that contains the arc.
Specifies the height of the ellipse that contains the arc.
Specifies the angle between the x-axis and the starting point of the arc.
Specifies the angle between the starting and ending points of the arc.
The width, in pixel, of the pen used to draw the arc.
Color of the arc. 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
DrawArc(Int32,Single,Single,Single,Single,Single,Single,Single,Int32,Boolean) Method
In This Topic
Draws an arc on a GdPicture image. The arc is part of an ellipse. This method takes a color integer as the PenColor parameter.
Syntax
'Declaration
 
Public Overloads Function DrawArc( _
   ByVal ImageID As Integer, _
   ByVal DstLeft As Single, _
   ByVal DstTop As Single, _
   ByVal Width As Single, _
   ByVal Height As Single, _
   ByVal StartAngle As Single, _
   ByVal SweepAngle As Single, _
   ByVal PenWidth As Single, _
   ByVal PenColor As Integer, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawArc( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   float StartAngle,
   float SweepAngle,
   float PenWidth,
   int PenColor,
   bool AntiAlias
)
public function DrawArc( 
    ImageID: Integer;
    DstLeft: Single;
    DstTop: Single;
    Width: Single;
    Height: Single;
    StartAngle: Single;
    SweepAngle: Single;
    PenWidth: Single;
    PenColor: Integer;
    AntiAlias: Boolean
): GdPictureStatus; 
public function DrawArc( 
   ImageID : int,
   DstLeft : float,
   DstTop : float,
   Width : float,
   Height : float,
   StartAngle : float,
   SweepAngle : float,
   PenWidth : float,
   PenColor : int,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawArc( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   float StartAngle,
   float SweepAngle,
   float PenWidth,
   int PenColor,
   bool AntiAlias
) 
public:
GdPictureStatus DrawArc( 
   int ImageID,
   float DstLeft,
   float DstTop,
   float Width,
   float Height,
   float StartAngle,
   float SweepAngle,
   float PenWidth,
   int PenColor,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture image identifier.
DstLeft
Specifies the x-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
DstTop
Specifies the y-coordinate of the upper-left corner of the bounding rectangle for the ellipse that contains the arc.
Width
Specifies the width of the ellipse that contains the arc.
Height
Specifies the height of the ellipse that contains the arc.
StartAngle
Specifies the angle between the x-axis and the starting point of the arc.
SweepAngle
Specifies the angle between the starting and ending points of the arc.
PenWidth
The width, in pixel, of the pen used to draw the arc.
PenColor
Color of the arc. 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
Drawing a red arc on top of a black ellipse on a pgn image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.png");
 
    // Draw the black elipse.
    gdpictureImaging.DrawEllipse(imageID, 50, 50, 100, 50, gdpictureImaging.ARGBI(255, 0, 0, 0), 1, true);
 
    // Draw the red arc using the same ellipse parameters and chosen angles.
    gdpictureImaging.DrawArc(imageID, 50, 50, 100, 50, 200, 160, 2, gdpictureImaging.ARGBI(255, 255, 0, 0), true);
 
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also