gfx:make-path

(gfx:make-path)


Description:

Returns a new empty path


Arguments:


Returns: path (NSBezierPath)


Related: gfx:close-path gfx:add-line gfx:add-arc gfx:set-start-point 


Examples:

; Create and return a square path object.

; A path is made up of line segments.

(define gfx:make-square

   (lambda (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