summaryrefslogtreecommitdiff
path: root/FL/x.H
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-15 14:06:16 +0000
commit45bb73a9bf4692c68294be12a2e25a39ca3a307b (patch)
tree97b86255a274ec6415738788c180d5528f0948d1 /FL/x.H
parent8b880adac62b6724c36405b173286362c386c227 (diff)
Commited WIN32 patches from Bill Spitzak and Gustavo Hime.
git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/x.H')
-rw-r--r--FL/x.H10
1 files changed, 7 insertions, 3 deletions
diff --git a/FL/x.H b/FL/x.H
index 39d1e7bb3..3e6c2c01f 100644
--- a/FL/x.H
+++ b/FL/x.H
@@ -47,9 +47,13 @@ extern ulong fl_event_time;
// off-screen pixmaps: create, destroy, draw into, copy to window:
#define Fl_Offscreen ulong
#define fl_create_offscreen(w,h) \
-XCreatePixmap(fl_display, fl_window, w, h, fl_visual->depth)
-#define fl_begin_offscreen(pixmap) Window _sw=fl_window;fl_window=pixmap;fl_push_no_clip()
-#define fl_end_offscreen() fl_pop_clip();fl_window = _sw
+ XCreatePixmap(fl_display, fl_window, w, h, fl_visual->depth)
+// begin/end are macros that save the old state in local variables:
+#define fl_begin_offscreen(pixmap) \
+ Window _sw=fl_window; fl_window=pixmap; fl_push_no_clip()
+#define fl_end_offscreen() \
+ fl_pop_clip(); fl_window = _sw
+
#define fl_copy_offscreen(x,y,w,h,pixmap,srcx,srcy) \
XCopyArea(fl_display, pixmap, fl_window, fl_gc, srcx, srcy, w, h, x, y)
#define fl_delete_offscreen(pixmap) XFreePixmap(fl_display, pixmap)