> From: "A.Sloman" <A.Sloman@cs.bham.ac.uk>
>
> Has anyone found a good way to determine the foreground or background
> colour of a window created using Xpw, e.g. the rc_graphic window.
The RGB values of a pixel can be returned with -XpwQueryColor- like
this:
uses rc_graphic;
rc_start();
;;; Get pixel of bg
vars bg_pixel = rc_window(XtN background);
bg_pixel=>
** 5
;;; Return RGB values (scaled to 0--255 inclusive)
vars rgb = [% XpwQueryColor(rc_window, bg_pixel) %]
rgb=>
** [135 206 250]
Is this enough?
aids (email: adrianh@cogs.susx.ac.uk, phone: [+44] (0)273-678367)
ObDisclamer: Poplog pay my wages
|