Hi Mark,
        I need to change the colors dynamically, so I
have to use XAllocColorCells(), that is what mentioned
in man pages, is it possible to change dynamically the
colors, when we use XAllocColor().

  I setted my display in 8bpp mode, so that example is
working, but when my netscape is open, I con't run my
XAllocColorCells example, it is giving error as 

 Bad Access(int parameter out of range for access)
 mager opcode (X_StoreColor)failed

it is giving the error like this, when I close my
netscape it is working fine, when I start my example
after that I start netscape, then no problem I cam
quit my example and start again it will work.

 why the Bad Access error from XStoreColor() is
comming even in 8bpp mode also(when the netscape is
open), is it not enough space is not available for
XStoreColor() to store the values, or we need to
validate the parameters to XStoreColors(), so that it
won't give int parameter out of range error, if it is
so, how to validate the parameters to XAllocColors().


Thanks in advance,
Bala.















--- Mark Vojkovich <[EMAIL PROTECTED]> wrote:
> 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


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to