Re: [gtk-devel] Depth checking

> I think that in the long run we may want to hide the visual/depth
> problems from the programmer and have a GC that can be used with
> any visual/depth (kind of like the Y window system).
> This may be an issue for Gtk+ 2.0, thuogh if we ever agree on it.

Although not having to worry about depths is the ideal, as it
stands there are a number of places where we have multiple depths.
The foremost being the bitmap with depth of 1.   Also to make
GC universally usable you would have to deal with color mapping
as setting a GC to blue in one visual will not draw blue in another.
This means abstracting color to the point where setting a color 
in the gc is in rbg and gets dithered if the color isn't available.

For the time being, there is a definate restriction on where a
gc can be used.  I think that we should at least warn about these
rather than silently ignoring them.  If at some point we wish
to make gcs free for use anywhere, we will still need the depth
to make sure that we can perform the action directly or need a
different algorithm.

Shall I continue the work and submit the patch?

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