Page 94 Table of Contents Index Page 96
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 12. GRAPHICS

Coordinates are real numbers in implementation-defined units. Often these units equal the spa-
tial resolution of a viewport, so that a line of thickness 1 is equivalent to the thinnest visible line.
However, this equivalence is not required and should not be assumed by application programs.

A valid CLIM implementation can be quite restrictive in the size and resolution of its viewports.
For example, the spatial resolution might be only a few dozen points per inch, the maximum size
might be only a few hundred points on a side, and there could be as few as two displayable colors
(usually black and white). The fully transparent and fully opaque opacity levels must always be
supported, but a valid CLIM implementation might support only a few opacity levels in between
(or possibly even none). A valid CLIM implementation might implement color blending and
unsaturated colors by stippling, although it is preferred, when possible, for a viewport to display
a uniform color as a uniform color rather than as a perceptible stipple.

When CLIM records the output to a sheet, there are no such limitations since CLIM just re-
members the drawing operations that were performed, not the results of rendering.

CLIM provides some ways to ask what resolution limits are in effect for a medium. See Chapter 10
for their descriptions.

The application programmer uses the CLIM graphic drawing model as an interface to describe
the intended visual appearance. An implementation does its best to approximate that ideal
appearance in a viewport, within its limitations of spatial resolution, color resolution, number
of simultaneously displayable colors, and drawing speed. This will usually require tradeoffs,
for example between speed and accuracy, and each implementation must make these tradeoffs
according to its own hardware/software environment and user concerns. For example, if the
actual device supports a limited number of colors, the desired color may be approximated by
techniques such as dithering or stippling. If the actual device cannot draw curves exactly, they
may be approximated, with or without anti-aliasing. If the actual device has limited opacity
resolution, color blending may be approximate. A viewport might display colors that don't
appear in the drawing plane, both because of color and opacity approximation and because of
anti-aliasing at the edges of drawn shapes.

It is likely that different implementations will produce somewhat different visual appearance
when running the same application. If an application requires more detailed control, it must
resort to a lower-level interface, and will become less portable as a result. These lower-level
interfaces will be documented on a per-platform basis.

Drawing computations are always carried out "in color", even if the viewport is only capable of
displaying black and white. In other words, the CLIM drawing model is always the fully general
model, even if an implementation's color resolution is limited enough that full use of the model
is not possible. Of course an application that fundamentally depends on color will not work well
on a viewport that cannot display color. Other applications will degrade gracefully.

Whether the implementation uses raster graphics or some other display technique is invisible
at this interface. CLIM does not specify the existence of pixels nor the exact details of scan
conversion, which will vary from one drawing engine to the next.

Performance will also vary between implementations. This interface is defined in terms of simple
conceptual operations, however an actual implementation may use caching, specialized object
representations, and other optimizations to avoid materializing storage-intensive or computation-


Page 94 Table of Contents Index Page 96
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E