Documentation / Marblecore Imaging / Methods / DrawArc
DrawArc method
Draws an arc on the specified position with the specified width and height on the image using the specified color, style and opacity.
Syntax
Boolean DrawArc(nLeft As Number, nTop As Number, nWidth As Number, nHeight As Number, nAngleStart As Number, nAngleSweep As Number, nPenColor As Number, nPenOpacity As Number, nPenStyle As Pen, nPenWidth As Number, bPenAntiAliasing As State)
Return value
Returns true if the function succeeded.
Parameters
Parameter | Type | Required | Description |
nLeft | Number | Yes | Specifies the horizontal coordinate. |
nTop | Number | Yes | Specifies the vertical coordinate. |
nWidth | Number | Yes | Specifies the width. |
nHeight | Number | Yes | Specifies the height. |
nAngleStart | Number | Yes | Specifies the start angle. |
nAngleSweep | Number | Yes | Specifies the sweep angle. |
nPenColor | Number | No | Optional parameter containing a color value. If no color is specified, the current pen color will be used instead. |
nPenOpacity | Number | No | Optional parameter containing the opacity percentage (where 0% is completely transparent). If no opacity is specified, the current pen opacity will be used instead. |
nPenStyle | Pen (Enumeration) | No | Optional parameter containing the desired line style. If no style is specified, the current pen style will be used instead. |
nPenWidth | Number | No | Optional parameter containing the desired line width (thickness) in pixels (ranging from 1...100). If no width is specified, the current pen width will be used instead. |
bPenAntiAliasing | State (Enumeration) | No | Optional parameter enabling or disabling line anti-aliasing. If not specified the current pen anti-aliasing setting will be used instead. |
Example
The example below shows how to use the method. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
1
2 MarblecoreImaging.Create(150, 150, true);
3
4
5 MarblecoreImaging.DrawArc(25, 25, 100, 100, 45, 270);
6
7
8 MarblecoreImaging.SaveToFile("example-drawarc.jpg");
Category
Drawing
See also
DrawArrow |
DrawBackground |
DrawBezier |
DrawCheckerboard |
DrawCurve |
DrawCurveBorder |
DrawCurveFilled |
DrawCurveGradient |
DrawEllipse |
DrawEllipseBorder |
DrawEllipseFilled |
DrawEllipseGradient |
DrawFloodFill |
DrawLine |
DrawPie |
DrawPieBorder |
DrawPieFilled |
DrawPieGradient |
DrawPixel |
DrawPolygon |
DrawPolygonBorder |
DrawPolygonFilled |
DrawPolygonGradient |
DrawRectangle |
DrawRectangleBorder |
DrawRectangleFilled |
DrawRectangleGradient |
DrawRectangleTransparent |
DrawRhombus |
DrawRhombusBorder |
DrawRhombusFilled |
DrawRhombusGradient |
DrawRoundRectangle |
DrawRoundRectangleBorder |
DrawRoundRectangleFilled |
DrawRoundRectangleGradient |
DrawTriangle |
DrawTriangleBorder |
DrawTriangleFilled |
DrawTriangleGradient |
GetPixelColor |
LineTo |
MoveTo