Check out the new USENIX Web site. next up previous
Next: Architecture of the Canvas Up: The GNOME Canvas: a Previous: Abstract

Introduction

The GNOME canvas is a generic, high-level engine for creating structured graphics. A canvas is a window that contains a collection of graphical items, including lines, polygons, rectangles, ellipses, and text. The term structured graphics means that you can place these graphical items in the canvas and refer to them later to change their attributes. For example, a program could place a white rectangle at some specific position, and later in its execution it could change the color, position, or any other attribute of the rectangle. The canvas would then take care of all redrawing operations.

Items inside a canvas can be organized in a tree of nested groups which are nodes in the tree, and terminal items which are leaves in the tree. The canvas allows arbitrary affine transformations like rotation, scaling, and translation to be applied to items and groups; if a transformation is applied to a canvas group, then all of its children will be transformed accordingly. This tree organization makes it easy to create hierarchical drawings.

The GNOME canvas has an open interface that allows applications to create their own custom canvas item types. This means that the canvas can work as a generic display engine for applications. One of the following sections in this paper describes case-by-case examples of the use of the canvas in different GNOME applications.

The canvas has multiple rendering backends, one for rendering using GDK to plain X drawables[4], one for rendering using high-quality antialiasing and transparency, and one for sending the contents of the canvas to a printer.

This paper describes the architecture of the canvas and its high-quality imaging model, and presents some examples of the use of the canvas in different GNOME applications. It also describes some of the future directions for development of the canvas display engine.


next up previous
Next: Architecture of the Canvas Up: The GNOME Canvas: a Previous: Abstract
Federico Mena Quintero
2000-05-08