This chapter describes the observations of a user running a typical session with a Bifrost application. Using this strategy, we try to introduce the concepts of Bifrost, as first seen by a new user.
Imagine a graphics workstation running a window system. One of the windows is a canvas showing graphics. See the Figure below:
The canvas picture: |
Graphical object: |
Picture: |
The canvas is a representation of a drawing surface, and is the connection between the window system and Bifrost. The canvas contains a picture, and all graphics shown in the canvas must be in the canvas picture. The picture is a collection of graphical objects, and realize the concept of graphics modelling. The graphical object is the smallest possible entity that can be drawn, and is complete in the sense, that it contains all necessary information about how the graphical object appears on the canvas, and is therefore independent of any other graphical objects in a picture.
The graphical object concept is a composition of two concepts: shape and paint. The shape describes the outline of the object, and the paint describes the color or raster to be pushed through the object when is it displayed on the canvas. The shape of a graphical object is described by segments. A segment is either a straight line segment or a spline segment. Spline segments are used to describe curves. The shape is analogous to the stencil in the Stencil & Paint imaging model.
The canvas picture in the margin consists of two objects: one graphical object and one picture. The gray circle graphical object is composed of a circle shape and a gray paint as illustrated in the Figure below:
The three other graphical objects in the example above are assembled in a picture consisting of a black frame, a gray half circle, and a black triangle. The picture is shown in the Figure below. The three graphical objects are also, of course, each defined by a shape and a paint.
The basic imaging model of Bifrost is thus very simple: define a shape that represents the outline of the object you like to draw, select a paint as the color for the object, construct a graphical object with the shape and paint just defined, and draw the object in a canvas, i.e. insert the graphical object into the canvas picture. If the object must have different colors the object must be split into more graphical objects and assembled in a picture. The picture is itself a graphical object, and can thus be drawn in a Canvas.
An application using Bifrost to render graphics, may use many canvases and windows, but each window must have at least one associated canvas to draw graphics. More than one canvas may be associated to the same window, and the canvases in the same window may overlap.
The Bifrost Graphics System - Reference Manual | © 1991-2002 Mjølner Informatics |
[Modified: Tuesday October 24th 2000 at 15:02]
|