Satimage Previous | Next
Quarter of circle
Home Documentation Smile The graphic library Samples Quarter of circle  
The samples script below shows how to use ArcPath and ClosePath. Note that none of the two radial strokes is explicitly programmed:
  • the pen being in the center, ArcPath draws the radius before drawing the arc,
  • since the path started from the center, ClosePath draws the radius back to the center. The junction of the two strokes is perfect. With a standard LineTo you would have to use additional settings to achieve the same effect.
The red is specified with a fourth component (opacity) lesser than 1:
{0.8, 0, 0, 0.9}
whence a transparency effect.
Import script

set r to 200
set c to {r * 1.25, r * 1.25}
BeginFigure(0)
SetPenWidth(r / 40)
SetFillColor({0.1, 0.1, 1})
CirclePath(c, r / 2)
DrawPath(3)
SetPenWidth(r / 20)
SetFillColor({0.8, 0, 0, 0.9})
MoveTo(c)
ArcPath(c, r, 0, pi / 2, false)
ClosePath()
DrawPath(3)
EndFigure()
Version française
Copyright ©2008 Paris, Satimage