chintcol, chpxy -- change visual display picture parameters


#include <mpict_p.h>

chintcol(ival, pic)
unsigend ival;
PICT pic;

chpxy(x, y, pic)
int x, y;
PICT pic;


chintcol and chpxy serve to change the parameter values of a picture that has parameter information explicitly associated with it (as opposed to a picture that relies default parameter values).

chintcol changes the intensity/color parameter associated with pic. pic must be a picture that was built by mkpar(3U) with the P_INTCOL flag set and an intesity/color parameter specified.

ival can range from 0 to 15. Changing this parameter affects the intensity of the picture on monochrome monitors and color on color monitors. On monochrome monitors, 15 intensity levels are available, 0 being the lowest and 15 highest. Absolute intensity also depends on the display refresh rate and the settling of the intensity control knob on the monitor. With color monitors, currently only 8 colors, as specified in the Color Lookup Table (see color(3u) ) can be accessed at a time. 0 and 1 specify the first color, 2 and 3 specify the second, etc.

The new intensity/color is inherited by all subpictures of pic that don't explicitly contain their own intensity/color level. Subpictures (and their subpictures) that do contain explicit intensity/color specifications are unaffected.

chpxy changes the horiziontal and vertical position offsets or absolute positions associated with pic. pic must be a picture built by mktop(3U) or by mkpar(3U) with the P_OFFSET flag set and offsets specified.

The MEGAPIC graphics facility produces pictures within the dimensions 4096 x 4096. With the origin in the center of the screen, x and y as absolute coordinates for a top picture can range from -2048 to 2047 in both dimensions. If the origin is the lower left of the display screen, coordinates can range from 0 to 4095 in both dimensions. If the numbers outside of these ranges are specified, wrap-around occurs. As offsets, x and y can range from -4096 to 4095, depending on the current location.

Unlike chintcol all subpictures within the top picture that contains pic that are drawn after pic are affected by the new x, y coordinates.

Both chintcol, chpxy, can change parameters values even while a picture is being displayed.


mkpar(3U) , mktop(3U) , origin(3U) , color(3U).


chitcol and chpxy return -1 if pic is not a valid argument, if the picture does not have the relevant parameter option flaggerd, or if malloc memory error occurs. Messages are printed at the console indicating the error.