Programmer's Reference


Common Graphics image support

An image is a two-dimensional array of pixels, with an associated palette defining the pixel values to color mapping. An icon is a small image augmented with tranparency information. Modern graphical user interfaces require not only the ability to draw lines, rectangles, arcs, and text, but also to display images and icons. The support for this in Xlib, on which the core Common Graphics classes are based, is minimal, providing only a low-level mechanism (XImage) for transferring image data between the application and drawables. Xlib's color mechanism (Colormap) is also very low level. The XImage and Colormap mechanisms place a heavy burden on the application, leaving it responsible for parsing image file formats, allocating the image's palette of colors one color at a time, remapping the image data to use the allocated pixel values for the colors, transferring the remapped data to a window or a pixmap whenever the image needs to be redrawn, and freeing color resources when the image is no longer required.

Common Graphics Image Support provides higher level abstractions for handling images, icons, colors, and palettes of colors. In keeping with the design philosophy of IBM Smalltalk, these abstractions are implemented using the highest level capabilities applicable on each platform. Image Support provides the following additional capabilities:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]