The GCW Driver (Gnome 2)

The GCW driver draws plots into a tabbed Gnome window. The driver's features and user interface are described in the Section called GCW Driver Basics. A specialized API allows interaction with the driver, and this is described in the Section called GCW Driver API.

GCW Driver Basics

The GCW driver plots each page into an individual tab within a Gnome window. The user interface built into the window allows a variety of actions. In particular, pages can be saved to files with extensions .ps, .psc, .png, .jpg, and .gif, which correspond to PLplot output driver devices described in Chapter 6.

The GCW driver supports anti-aliasing and is unicode enabled.

There are a variety of hot keys that may be used in the user interface:

The available driver options (used with the -drvopt command-line argument) are:

The text option toggles between TrueType and Hershey fonts. The Hershey fonts provide a reference implementation for text representation in PLplot.

The hrshsym option is used to indicate that symbols should be drawn using the Hershey fonts. This is useful when plots need to be saved to PostScript files, because the Type I fonts used by the PS and PSC devices do not support all Unicode symbols.

Most of the command-line arguments described in the Section called Command Line Arguments in Chapter 3 are also supported. Some key arguments for use with the GCW driver are:

The nopixmap option disables the use of the internal pixmap for drawing lines and shades, which will normally appear somewhat pixelated. The nopixmap option directs the driver to use anti-aliased vector graphics instead, resulting in higher quality plots but rendered at a slower speed. This option does not affect the quality of plots saved from the GCW user interface. Note that the TrueType fonts are always anti-aliased.

GCW Driver API

The GCW driver provides an additional API that allows for a higher degree of control by the user. The C API is described below, and bindings to other languages are described in *** NEEDS DOCUMENTATION ***.

The function prototypes are defined in gcw.h. Programs that need access to this API must be linked against the libplplotgnome2d library rather than libplplotd. This is most easily accomplished using pkg-config; i.e.,


	  gcc x01c.c -o x01c `pkg-config --cflags --libs plplotd-gnome2`
	
You may need to remind pkg-config where to look for the plplotd-gnome2 file installed by PLplot; e.g.,

	  gcc x01c.c -o x01c `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --cflags --libs plplotd-gnome2`
	

gcw_use_text: Sets font usage.

void gcw_use_text(use_text);

Sets whether TrueType text or Hershey fonts are used.

use_text (PLINT, input)

1 for TrueType fonts (default), 0 for Hershey fonts.

gcw_use_pixmapSets pixmap usage.

void gcw_use_pixmap(use_pixmap);

Sets whether lines and shades are drawn to a pixmap, or instead as vector graphics.

Lines and shade drawn to the pixmap may appear pixelated. Vector graphics are fully anti-aliased, but are rendered at a slower speed.

use_pixmap (PLINT, input)

1 to use pixmap (default), 0 for vector graphics instead.