Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!rws From: rws@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: X region and its data structure Message-ID: <8908011153.AA01396@expire.lcs.mit.edu> Date: 1 Aug 89 11:53:00 GMT References: <7133@kuhub.cc.ukans.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 31 What is the data structure for X region? A list of YX-banded rectangles and a total extents. How can I creat an ellipse region? Xlib doesn't really provide a way, sorry. If you want to use it for clipping in the server, you can create a bitmap in the server, draw the ellipse into it, and then use the bitmap as a clip mask. I want to set a new clipmask region by intersecting the current clipmask region with a third region. The X protocol doesn't support clip mask region operations on the server side, sorry. (We have given some thought to an extension that would permit this.) You'll either have to do all of the region arithmetic on the client side (e.g. using XIntersectRegion), or do it all on the server side (e.g. using bitmaps and GC functions to combine them and then re-store the bitmap into the GC). It is possible to create an arbitrary region by creating a bitmap first Yes. But when I set this region, the old clipmask region will be destroyed. Correct. Is there a way to keep the old region for later use? You can copy it to another GC, but you can't do region arithmetic with it.