HPPEXGammaCorrect(3G)
Name
HPPEXGammaCorrect − enable/disable gamma correction on a drawable to support HP-PEX antialiasing
Syntax
#include <hpgamma.h>
int HPPEXGammaCorrect(Display *display, Drawable drawable, int enable)
Parameters
display
A pointer to a display structure returned by a successful XOpenDisplay call, on which PEXlib has been initialized.
drawable
The identifier of a valid Drawable for which gamma correction is to be enabled or disabled. Gamma correction may modify the Colormap attached to a Window Drawable.
enableA flag that controls gamma correction. The value should be to enable gamma correction, to disable it.
Returns
The function returns a value of zero if successful.
A negative return value indicates failure. Currently no failure values are defined or returned, however future implementations of the interface may return failure codes.
Description
This procedure enables or disables gamma correction for all PEX Renderers used with this Drawable, and if the Drawable is a Window, may also modify the Colormap attached to the Window. Gamma correction is important only when using the HP-PEX-specific GSE,
Restrictions
Important Note: In this release, the X Colormap attached to a Window is not simply modified, but is replaced by a private and completely writeable X Colormap created by HP-PEX. This is not standard PEX behavior. A future implementation may behave differently, and require that the Colormap or at least the color approximation region of the Colormap attached to the Window be writeable.
Note: Neither antialiasing support nor gamma correction support are standard features of PEX or PEXlib. These are HP-PEX implementation-dependent features, and application writers should be aware that this functionality may only be available on HP-PEX. Furthermore, not all devices that support HP-PEX have antialiasing capabilities. On devices that do not support antialiasing, both the GSE and this utility may be called but will have no effect.
See Also
HP PEXlib Implementation and Programming Supplement
(c) Hewlett-Packard Company — HP PEXlib Release 5.1: January 1993