djf@ATHENA.MIT.EDU (01/13/90)
I need to fill a rectangle of a Pixmap with the background color in a gc. I don't know what the background color is, I just have the GC. I'm using R3, so I can't query the GC to find out. I can't use XClearArea, because that only works for windows, not pixmaps. Anyone have a clue how to do this? David Flanagan
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/13/90)
I can't use XClearArea, because that only works for windows, not pixmaps. This wouldn't do precisely what you ask anyway, since it would use the background of the window, not whatever pixel value you had as background in the GC. My advice would be to take the expedient approach and cheat, knowing that the R4 interface (XGetGCValues) will solve your problem. Simply extract gc->values.background and use it to set the foreground, and then use XFillRectangle. Put an XXX comment in your code, so you'll remember to fix it when Athena gets R4 installed on campus.