From 45bb73a9bf4692c68294be12a2e25a39ca3a307b Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 15 Oct 1998 14:06:16 +0000 Subject: Commited WIN32 patches from Bill Spitzak and Gustavo Hime. git-svn-id: file:///fltk/svn/fltk/trunk@11 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/x.H | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'FL/x.H') 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) -- cgit v1.2.3