Let g gctxtranslate g 22 in wrepaint g draw the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; ());! -> (w,h)) ! 16 The canvas Widget •  Region of the screen that can be drawn upon •  Has a fixed width and height •  Parameterized by a repaint method –  Use the primiZve Gctx drawing rouZnes to draw on the canvas simpleWidget.ml (* expose the graphics context as a widget *)! let canvas ((w,h):int*int)(repaint: Gctx.t -> unit) : t =! {! repaint = repaint;! size = (fun (_:Gctx.t) -> (w,h))! }! CIS120 / Spring 2011 17 The Border Widge...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online