TkGS Specification - Model

Introduction

TkGS uses a device-independent architecture, based on the Tk windowing model. TkGS only addresses the graphics functions; windows creations must be handled by Tk.

All concepts defined by TkGS use object-oriented paradigms. To ensure system- and device-independence, they are most of the time opaque tokens pointing to the real device-dependent private structures.

Definitions

Device
A device can be anything from a window to a printer. A device is responsible for function call handling and structures managing. Devices expose their capabilities through the TkGS API.
Drawable
A drawable is the place where the drawing primitives occur. A drawable belongs to a specific device, and can be a window's drawing area or a printer page. Each drawable holds a drawing state that is used to perform drawing primitives.
Graphics Context (GC)
A Graphics Context (GC) holds all the parameters needed to perform drawing primitives. These parameters could be for example the foreground and background colors, the font, or the clipping region.

TODO