(gfx:add-arc path x y radius start end)


Appends an arc to the given path. be aware that the x and y coordinates are the centre of the arc.  if you are adding to an existing path there will be a line drawn from the last point defined. this goes for the set-start-point function as well that you may not want to use with add-arc.


           path -- The path to append this arc to

            end -- The end of the arc in radians

         radius -- The radius of the arc

          start -- The start of the arc in radians

              x -- x centre point

              y -- y centre point

Returns: boolean


(define *canvas* (gfx:make-canvas '(100 100 600 600))

(define *path* (gfx:make-path))

; start arc at 12oclock finish at 6oclock

; start at end of path with radius 50

(define *point* (gfx:get-path-point *path*))

(add-arc *path* (car *point*) (cons *point*) 50

  1.5708 4.7124)

(gfx:draw-path (now) *canvas* *path* '(0 0 1 1) '(1 0 0

  1) 10.0)

Back to index