Let space whintint repaint fun gctxt size

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: OCaml’s Graphics Module (graphics.cma) Graphics Contexts Absolute (0,0) widget- local (0,0) (x,y) widget h w A graphics context Gctx.t represents a posiZon within the window, relaZve to which the widget- local coordinates should be interpreted. We can add addiZonal context informaZon that should be “inherited” by children widgets (e.g. current pen color). CIS120/ Spring 2011 Module: Gctx Graphics Contexts Simple Widgets (* An interface for simple GUI widgets *)! type t = { ! repaint : Gctx.t -> unit; ! size : Gctx.t -> (int * int) ! }! •  You can ask a simple wi...
View Full Document

This document was uploaded on 11/24/2013.

Ask a homework question - tutors are online