On Wed, 28 Nov 2001, Ba la wrote:
> Hi,
> I have one example using XAllocColorCells(), I want
> to make it work with 24bpp mode, for that I am trying
> to convert the function XAllocColorCells() to
> XAllocColor(), after conveting that it is giving Bad
> Value error (int parameter out of range), is there any
> exapmle or tutorials for this kind of convertions???
>
XAllocColor returns BadValue? That shouldn't be possible.
Use of XAllocColor replaces both XAllocColorCells and
the XStoreColor. With XAllocColor you simply pass
in the RGB values that you want. It returns the closest
RGB color and fills in the pixel value of that color.
Alternatively you could have generated the pixel values
yourself without calling XAllocColor. All you need is the
RGB masks in the XVisualInfo for the visual you are using.
Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert