ArcShape

From Xojo Documentation

Class (inherits from OvalShape)

Used for drawing arcs in a vector graphics environment.

Properties
ArcAngle FillColor StartAngle
Border Height Width
BorderColor Rotation X
BorderWidth Scale Y
Fill Segments

Notes

A StartAngle of 0 means due east, i.e., a positive X value with Y = 0. Positive angles are clockwise, just as with Object2D rotation. The value of ArcAngle can be positive or negative, extending from the starting angle. If the angle is filled, it produces a wedge; this may be useful for making pie charts, for example.

The radius of the arc is determined by its Width and Height properties. These are inherited from RectShape. The default values of Width and Height are 100 pixels. This means that the default value of the radius is 100/2 = 50 pixels.

Sample Code

The following method, when called from the Paint event of a Window, creates an arc.

Dim a As New ArcShape
a.ArcAngle = 1.57
a.StartAngle = -1.57
a.FillColor = RGB(255, 0, 127)
g.DrawObject(a, 100, 100)

See Also

CurveShape, FigureShape, FolderItem, Graphics, Group2D, Object2D, OvalShape, Picture, PixmapShape, RectShape, RoundRectShape, StringShape classes.