arc. Drawing an arc

^image.arc(center x;center y;width;height;start in degrees;end in degrees;color)

The method draws an arc with specified parameters. The arc represents a part of an ellipse (as a special case of circle) and is defined by center coordinates (X;Y) and width and height as well as initial and final angles given in degrees.

Example
$square[^image::create(100;100;0x000000)]
^square.arc(50;50;40;40;0;90;0xFFFFFF)
$
response:body[^square.gif[]]

Browser will display a black square with an arc equal to a quarter (0-90 degrees) of a circle with a 40-pixel radius.


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 20.09.2007