AddArcToPath(id, xc, yc, ra, rb, start, end[, clockwise])
xc
and
yc
arguments. The arc's radii have to be passed in ra
and rb
, and
the start and end angles have to be specified in the start
and end
arguments respectively. All angles must be specified in degrees. If you
want to have a closed ellipse, the start argument needs to be 0 and the
end argument needs to be 360. Using the AddEllipseToPath() command is of
course easier in this case. The optional argument clockwise
can be used
to specify whether or not the elliptical arc shall be drawn in clockwise
direction. This tag defaults to True
which means clockwise drawing. If
you set it to False
, AddArcToPath()
will connect the angles in anti-
clockwise direction.
Note that AddArcToPath()
doesn't add a center point vertex. If you want
the start and end angles of the arc to be connected with the center point, you
need to do this manually by calling MoveTo() before
AddArcToPath()
and LineTo() afterwards.
Also note that AddArcToPath()
only starts a new subpath in case there is no
active subpath. Otherwise it will simply connect its vertices to the currently
active subpath. If you don't want this, you'll have to manually open a new
subpath before calling AddArcToPath()
. Furthermore, AddArcToPath()
also won't
close the active subpath when it is finished.
True
which means clockwise)