ClearWin+ includes a library of drawing routines for drawing lines and text, for
filling areas, for copying images, etc.. These routines do not have an explicit
argument referring to the 'surface' on which the drawing is to take place.
Instead, drawing routines are applied to what is called the current drawing
surface. This drawing surface can be:
1) one of a number of rectangular areas of the screen generated by
2) one of a number of printer bitmaps (created for example by
3) an internal drawing surface created by
create_graphics_region@ (that is, a bitmap that is created for copying to
another drawing surface).
When it is necessary to distinguish one surface from another, the programmer
provides a unique integer identifier (called a handle) and the routine
select_graphics_object@ is used to provide the switch. This chapter describes drawing
surfaces created using %gr and create_graphics_region@. Printer
surfaces are described in Using the printer.
%gr is one of three graphics format codes provided by ClearWin+. The others are
%og (used to create a region in which OpenGL routines are used; described in
the next chapter) and %dw (used to create a region in which Windows API
functions are used; described at the end of this chapter). Using these formats
it is possible to embed your graphics in a window together with other controls.
The ClearWin+ library of drawing routines is used only with %gr. Thus, only %gr
(not %og and %dw) generates a drawing surface.