setting colormap for bitmaps



	I've put a patch on bugzilla (bug #57604) to ensure that
the depth of a drawable and the depth of its colormap's visual
match. This means, however, that if X doesn't provide a visual
of depth 1, certain things don't work for bitmaps:

gdk_drawable_get_image()	(already broken previously)

setting the foreground color in a GdkGC for a bitmap, since there
is no colormap to allocate the color in. This breaks code
which, for example, draws a rectangle to a newly created bitmap
to clear it.

There are probably other examples. The only way to fix this while
maintaining the drawable/visual depth match is to ensure that
the x11 implementation provides a visual of depth 1. If that
isn't working automatically (as it's not in my case, with
a fairly standard Debian XFree86 version 3.3.6 installation),
there are three basic options:

1. Get the X server to create a visual with depth of 1. I don't
	know if this is sensible or even possible.

2. Create a `fake' GdkVisual with no corresponding visual under X.

3. Create a GdkColormap with a NULL visual.

I don't know if any of these make any sense. Comments from anyone with
X experience? Are there options I'm missing?

Ron




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