nanogui: Pixmaps


Previous by date: 20 May 1999 00:46:48 -0000 Re: nano-X driver stability discussion, Alex Holden
Next by date: 20 May 1999 00:46:48 -0000 Re: Bitblt proposal (was: Re: bogl routines), Alex Holden
Previous in thread: 20 May 1999 00:46:48 -0000 Pixmaps, Alex Holden
Next in thread: 20 May 1999 00:46:48 -0000 Re: Pixmaps, Alex Holden

Subject: Re: Pixmaps
From: Warner Losh ####@####.####
Date: 20 May 1999 00:46:48 -0000
Message-Id: <199905200040.SAA02962@harmony.village.org>

In message <Pine.LNX.4.04.9905200050410.5020-100000@hyperspace> Alex Holden writes:
: I just read the official X11 manual again (a very nice piece of
: documentation- it's interesting to see how closely mini-X was modelled on
: X) in an effort to understand something which has never made sense to me.
: I still don't get it. Why do pixmaps have depth?

XCopyArea can take a Pixmap of any depth, assuming that the Pixmap
depth matches the depth of the Drawable.  They can also be used as the
background pixmap for a window.

XCopyPlane is different in that it can only take a one bit drawable,
if I recall correctly.

: There doesn't seem to be
: any way of making use of anything other than the top layer, so what is the
: point of letting them have an arbritrary number of layers?

XCopyArea will take a pixmap of any depth.  Many window managers use
this for icons.  Some applications have a "zero repaint" time by
drawing into a Pixmap, then setting it as the background Pixmap for
the window.  This works well for things like clocks that you don't
want to have to bother refreshing every time something obscures it...

: I can see the
: point of server side bitmaps, sure, but what use are multi-layer pixmaps?

They aren't multi-layered, per se.  They are just hunks of data.  A 1
bit pixmap is the same thing as a 8 bit pixmap.  It isn't a good idea
to think of them as layers, because they really aren't.  True, a 1 bit
pixmap can be used as a clip mask, which gives the illusion of
layering, but it is just clipping.

So there is more there than meets the eye...  There are some limits,
and they are annoying and irritating, but they are generally useful.

Warner

Previous by date: 20 May 1999 00:46:48 -0000 Re: nano-X driver stability discussion, Alex Holden
Next by date: 20 May 1999 00:46:48 -0000 Re: Bitblt proposal (was: Re: bogl routines), Alex Holden
Previous in thread: 20 May 1999 00:46:48 -0000 Pixmaps, Alex Holden
Next in thread: 20 May 1999 00:46:48 -0000 Re: Pixmaps, Alex Holden


Powered by ezmlm-browse 0.20.