[comp.windows.x] XClearPixmap

rune.johansen%odin.re.nta.uninett@NAC.NO (Rune Henning Johansen) (06/07/90)

  What's the easiest way to make a 'XClearPixmap' work
  the same way as 'XClearWindow'.

    - Rune.

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (06/09/90)

> What's the easiest way to make a 'XClearPixmap' work the same way as
> 'XClearWindow'.

It doesn't make sense?  XClearWindow clears a window to what.  Its
background, that's what?  But pixmaps don't have backgrounds, so it
doesn't make sense to speak of clearing a pixmap to its background?

The Xlib documentation even says as much:

	6.1.  Clearing Areas
	
	Xlib provides functions that you can use to clear an area or
	the entire window.  Because pixmaps do not have defined
	backgrounds, they cannot be filled by using the functions
	described in this section.  Instead, to accomplish an analo-
	gous operation on a pixmap, you should use XFillRectangle,
	which sets the pixmap to a known value.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu