| version 1.1, 2001/09/20 14:12:00 |
version 1.2, 2002/07/07 23:57:58 |
| Line 11 void XG_Setup_Pixmap(WindowType theWindo |
|
| Line 11 void XG_Setup_Pixmap(WindowType theWindo |
|
| theClientArea.width = Tk_Width(tkwin); |
theClientArea.width = Tk_Width(tkwin); |
| theClientArea.height = Tk_Height(tkwin); |
theClientArea.height = Tk_Height(tkwin); |
| XSetClipRectangles(theDisplay, theWindow->xwingc, 0, 0, &theClientArea, |
XSetClipRectangles(theDisplay, theWindow->xwingc, 0, 0, &theClientArea, |
| 1, Unsorted); |
1, Unsorted); |
| |
|
| if (theWindow->pixmap_buffer) { |
if (theWindow->pixmap_buffer) { |
| XFreePixmap(theDisplay,theWindow->pixmap_buffer); |
XFreePixmap(theDisplay,theWindow->pixmap_buffer); |
| } |
} |
| |
|
| theWindow->pixmap_buffer = XCreatePixmap(theDisplay, Tk_WindowId(tkwin), |
theWindow->pixmap_buffer = XCreatePixmap(theDisplay, |
| Tk_Width(tkwin), |
Tk_WindowId(tkwin), |
| Tk_Height(tkwin), |
Tk_Width(tkwin), |
| Tk_Depth(tkwin)); |
Tk_Height(tkwin), |
| |
Tk_Depth(tkwin)); |
| |
|
| if (!(theWindow->pixmap_buffer)) { |
if (!(theWindow->pixmap_buffer)) { |
| puts("XG_Setup_Pixmap couldn't XCreatePixmap"); |
puts("XG_Setup_Pixmap couldn't XCreatePixmap"); |
| Line 29 void XG_Setup_Pixmap(WindowType theWindo |
|
| Line 30 void XG_Setup_Pixmap(WindowType theWindo |
|
| |
|
| XSetForeground(theDisplay, theWindow->xwingc, GrayShade[3]); |
XSetForeground(theDisplay, theWindow->xwingc, GrayShade[3]); |
| XFillRectangle(theDisplay, theWindow->pixmap_buffer, theWindow->xwingc, |
XFillRectangle(theDisplay, theWindow->pixmap_buffer, theWindow->xwingc, |
| 0, 0, Tk_Width(tkwin), Tk_Height(tkwin)); |
0, 0, Tk_Width(tkwin), Tk_Height(tkwin)); |
| |
|
| XSetClipMask(theDisplay, theWindow->xwingc, None); |
XSetClipMask(theDisplay, theWindow->xwingc, None); |
| } // }}} |
} // }}} |
| Line 46 void XG_Copy_Pixmap(WindowType theWindow |
|
| Line 47 void XG_Copy_Pixmap(WindowType theWindow |
|
| theClientArea.height = Tk_Height(tkwin); |
theClientArea.height = Tk_Height(tkwin); |
| |
|
| XCopyArea(theDisplay, theWindow->pixmap_buffer, Tk_WindowId(tkwin), |
XCopyArea(theDisplay, theWindow->pixmap_buffer, Tk_WindowId(tkwin), |
| theWindow->xwingc, 0, 0, |
theWindow->xwingc, 0, 0, |
| Tk_Width(tkwin), Tk_Height(tkwin), |
Tk_Width(tkwin), Tk_Height(tkwin), |
| 0, 0); |
0, 0); |
| XFlush(theDisplay); |
XFlush(theDisplay); |
| } // }}} |
} // }}} |
| |
|