Graphics

In this section:

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 %gr (Graphics Region),

2)  one of a number of printer bitmaps (created for example by OPEN_PRINTER@),

3)  an internal drawing surface created by CREATE_GRAPHICS_REGION@ or NEW_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 and the routine SELECT_GRAPHICS_OBJECT@ is used to provide the switch. This chapter describes drawing surfaces created using %gr (Graphics Region) and create_graphics_region@. Printer surfaces are described in Using the printer.

%gr (Graphics Region) is one of three graphics format codes provided by ClearWin+. The others are %og (OpenGL Graphics Region) (used to create a region in which OpenGL routines are used; described here) and %dw (Owner Draw Graphics) (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 (Graphics Region). Thus, only %gr (not %og and %dw) generates a drawing surface.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited