8.1 Drawing and Visible Area

The canvas is a potentially infinitely large drawing area. Hence everything in the canvas is not necessarily immediately visible on the display device. The canvas therefore defines a visible area, defined by means of a shape called the visible shape. The visible shape is not fixed and can be reshaped even after graphical objects have been drawn in the canvas. The visible shape is a view to the canvas. By moving the visible shape it is possible to view other parts of the canvas, hence the visible shape can be used to implement scrolling. Notice that the visible shape is not effected by the surroundings of the canvas, e.g. by overlapping windows.

In typical drawing applications where the user chooses a part of the canvas to actually see on the display device, the application programmer should not consider which part of the canvas is visible, but should regard all the graphical objects in the canvas as being visible. The canvas will only draw those graphical objects that are visible on the device. This is accomplished by clipping and updating as described in section Clipping and Updating Damaged Areas.


The Bifrost Graphics System - Reference Manual
© 1991-2002 Mjølner Informatics
[Modified: Monday October 16th 2000 at 13:43]