Re: GC graphics_exposures
Peter Zelezny <[email protected]> Thu, 23 Jan 2003 14:33:03 +1100
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 22 Jan 2003 23:24:52 +0000 Tor Lillqvist <[email protected]> wrote: > > Just wondering if there are any plans to implement the graphics_exposures > > flag of GCs? Without it, my custom widgets display visual artifacts when > > trying to scroll while partly obscured. > > Umm, I'm too lazy to dig out the X11 protocol specs and/or Xlib docs > right now, refresh my memory, what does graphics_exposures mean? When you gdk_draw_drawable from the same src/dest (just copy an area of a window), there might be parts of the src-rectangle that are obscured by another top-level window. Of course, copying parts of the obscured areas will copy garbage. With the gc->graphics_exposures flag true, it would generate an expose event for the parts of the draw_drawable-src-rectangle that were obscured. Pseudo code: gdk_win32_draw_drawable(drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height) { _gdk_win32_blit (....); if (gc->graphics_exposures) { obscured_rect = find_obscured_rect (src); if (obscured_rect) { expose_region = intersection (obscured_rect, xsrc, ysrc, width, height); generate_expose_event (drawable, expose_region); } } } I'm not sure if "intersection" is the right word there, but we want the area that's apart of the obscured_rect AND src-rectangle (if any). Find_obscured_rect() might be a problem. I'm not too famaliar with win32 API, but is there a call to find this? -- Peter Zelezny. To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/