Qt-interest Archive, August 1999
100 shades of grey III
Message 1 in thread
Hi,
I got a hint from Dan in Denmark how I could allocate 100 shades of gray
using color allocation contexts.
This works, but there's still one point left which I cannot understand:
I have 2 applications now which run both on a Graphics hardware
providing a colormap with 256 colors.
Each application tries to allocate 100 shades of gray.
One application is Qt code, the other is Xt code I've written before.
The shading result of the Qt application is significantly BETTER, if I
start the Xt application FIRST.
Does Qt allocate non-precise colors even if there are free colorcells
available?
Stefan
Message 2 in thread
Stefan Link wrote:
>
> Hi,
>
> I got a hint from Dan in Denmark how I could allocate 100 shades of gray
> using color allocation contexts.
> This works, but there's still one point left which I cannot understand:
>
> I have 2 applications now which run both on a Graphics hardware
> providing a colormap with 256 colors.
> Each application tries to allocate 100 shades of gray.
> One application is Qt code, the other is Xt code I've written before.
>
> The shading result of the Qt application is significantly BETTER, if I
> start the Xt application FIRST.
>
> Does Qt allocate non-precise colors even if there are free colorcells
> available?
>
> Stefan
Everything works now.
I used enter/eaveAllocContext(), disabled lazy allocation and called
alloc() for every wanted shade of grey.
Thanks to all who helped me with this.
>
> --
> List archive and information: http://www.troll.no/qt-interest/