This method draws arcs, pie shapes, and chords using polylines and polygons.

[Visual Basic] Public Function DrawArc(center As Point, radius As Integer, startAngle As Integer, drawAngle As Integer, numPoints As Integer, pie As Boolean, close As Boolean) As Boolean
[C#] public bool DrawArc(Point center, int radius, int startAngle, int drawAngle, int numPoints, bool pie, bool close);

Parameters

center

Coordinates for the center of the arc

radius

The radius of the circle of which the arc is a segment. (pixels)

startAngle

The angle setting the start of the arc.

drawAngle

The angle defining the drawing of the arc. Arcs are drawn from the start angle and continue for the number of degrees set in the drawAngle parameter.

numPoints

The number of points along the arc used to draw the arc. (2 or more points)

pie

Sets whether an arc or a pie shape is drawn

close

Sets whether the arc is closed

Return Value

Returns True if successful, otherwise returns False.

Explanation

The DrawArc method draws arcs, pie shapes, and chords using polylines and polygons.

To draw an arc, set appropriate values in the PenWidth, ForeColor, ForeColorOpacity, LineJoin, DashStyle properties and the appropriate parameters.

When using the DrawArc method, it is not necessary to set the EditKind property, depending on the properties that are used with the DrawArc method, a polyline or polygon object will be used.

The startAngle and drawAngle parameters determine the amount of the circle that is drawn as an arc. 0 degrees is defined as a position directly vertical above the center point, i.e. 12 o'clock. Positive values for the startAngle and drawAngle are in the clockwise direction. Negative values for these angles are in the counter-clockwise direction. The range of values is from 0 to +- 359. Values above 360 degrees will be set as 360.

A radius value of less than 1, a drawAngle value of 0, and a numPoints value of less than 2 will result in an error and False will be returned.

To delete the arc drawn with the DrawArc method, right click the object and display the context menu, the select "Undo" or execute the Undo method. After the arc is drawn, it may be modified via the polyline or polygon annotation objects.

If a portion of the arc lies outside the ImageKit control and the LimitAnnotationPosition property or LimitDrawPosition property are true, the arc will be resized to fit completely within the ImageKit control. In some cases this may result in an annotation that is not an arc or fan shape.

Values for pie and close pie: False,  close: False pie: False,  close: True pie: True,  close: False pie: True,  close: True
Shape Arc - polyline Closed Arc - polyline Fan Shape - polyline
(center is start and end point)
Fan Shape - polygon
The type of object drawn KindOfEdit.Polyline KindOfEdit.Polygon KindOfEdit.Polyline KindOfEdit.Polygon
Other properties that can be set StartLineCap
EndLineCap
StartArrowCap
StartArrowCapFilled
StartArrowCapSize
EndArrowCap
EndArrowCapFilled
EndArrowCapSize
Fill StartLineCap
EndLineCap
StartArrowCap
StartArrowCapFilled
StartArrowCapSize
EndArrowCap
EndArrowCapFilled
EndArrowCapSize
Fill
Example of Object

See also

ImageKit.Edit Members | Newtone.ImageKit.Win.ImageKit

 

The ImageKit.NET3 is created by Newtone Corporation