12.1 Overview of Graphics

The CLIM graphic drawing model is an idealized model of graphical pictures. The model provides the language that application programs use to describe the intended visual appearance of textual and graphical output. Usually not all of the contents of the screen are described using the graphic drawing model. For example, menus and scroll bars might be described in higher-level terms. [annotate]

An important aspect of the CLIM graphic drawing model is its extreme device independence. The model describes ideal graphical images and ignores limitations of actual graphics devices. One consequence of this is that the actual visual appearance of the screen can only be an approximation of the appearance specified by the model. Another consequence of this is that the model is highly portable. [annotate]

CLIM separates output into two layers, a text/graphics layer in which one specifies the desired visual appearance independent of device resolution and characteristics, and a rendering layer in which some approximation of the desired visual appearance is created on the device. Of course application programs can inquire about the device resolution and characteristics if they wish and modify their desired visual appearance on that basis. (There is also a third layer above these two layers, the adaptive toolkit layer where one specifies the desired functionality rather than the desired visual appearance.) [annotate]

Major issue: There are still no functions to ask about device resolution and characteristics. What characteristics do we need to be able to get to besides the obvious ones of resolution and "color depth". Also, do we really need to refer to the adaptive toolkit layer here? --- SWM [annotate]

Note: Where possible, device DPI- but (e.g. on the web) this is not possible, so perhaps at bare minimum a "devicePixelRatio"? (see MDN) [edit]-- Matt Seddon 2020-01-23 22:21Z

CLIM's drawing functions provide convenient ways to draw several commonly-used shapes. [annotate]

The interaction between graphics and output recording will be described in Chapter 16. [annotate]