Re: Rendering GdkRGB to a 1-bpp pixmap (display)



On 28 Jan 2003, Michael L Torrie wrote:

> Is asking the X server which color is which a good idea or should I
> force the color map to be a certain way?  Obviously non-X platforms

Ask the X server (you can't always change the color map).

X has functions for that:

# man BlackPixel
...
       BlackPixel(display, screen_number)

       WhitePixel(display, screen_number)
...
       The BlackPixel macro returns the black pixel value for the specified screen.

       The WhitePixel macro returns the white pixel value for the specified screen.
...

-Peter

``Average programmers should be rounded up and placed in internment camps
to keep them away from keyboards.''




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]