gfx:close-path

(gfx:close-path path)


Description:

Closes off a path.  Not required if drawing a simple path.  It is required to complete the construction of a complex path (i.e. a path that contains other paths).


Arguments:

           path -- close off path


Returns: boolean


Related: gfx:make-path gfx:set-start-point gfx:add-line gfx:add-curve gfx:add-arc gfx:make-oval gfx:gfx:make-circle 


Examples:

; create and return a square path object

(define (gfx:make-square x y size)

   (let ((path (gfx:make-path)))

      (gfx:set-start-point path x y)

      (gfx:add-line path x (+ y size))

      (gfx:add-line path (+ x size) (+ y size))

      (gfx:add-line path (+ x size) y)

      (gfx:add-line path x y)

  (gfx:close-path path)

      path))



Back to index