gfx:make-canvas

(gfx:make-canvas [fullscreen] || [bounds] || [w] [h] [screen number])


Description:

Create and return a reference to a new graphics canvas. if fullscreen (#t) is provided then make fullscreen, if w,h make window size w,h if list make window of bounds if no args make a window of default size and position. screen number is an optional argument only available if fullscreen is #t


Arguments:

     fullscreen -- a boolean to set the canvas to fullscreen.

  screen number -- optional screen number index starting from 0. only available if fullscreen is #t

              w -- width

         bounds -- size of window to create

              h -- height


Returns: graphics canvas


Examples:

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

(define square (gfx:make-square 100 100 50))

(define circle (gfx:make-circle 200 200 20))

(define oval (gfx:make-oval 200 100 50 100))

(gfx:draw-path (now) *canvas* square '(0.1 0.5 0.5 0.5) '(0.4 0.2 0.8 0.4))

(gfx:draw-path (now) *canvas* circle '(0.1 0.5 0.5 0.5) '() 20.0)

(gfx:draw-path (now) *canvas* oval '() '(0.4 0.2 0.8 0.4))



Back to index