re how xcreateregion works in article td ininnl m finch doc ic ac uk ln doc ic ac uk leonidas nikidis writes hi could someone explain to me what exactly the xlib functions xcreateregion xpolygonregion xpointinregion do or to suggest a ftp site where i can find programs using these functions ps the man pages does not explain much thank you leo leonidas nikidis ln doc ic ac uk imperial college london uk dept of computing i use those routines in a widget which only redraws exposed areas here s a small piece of code that uses those routines static void redisplay pw ev region xtpmanagerwidget pw xexposeevent ev region region pp exposure region is an xregion xtpmanagerpart pp pw plotter pp exposure region xcreateregion region is passed via an expose event if region null if ev send event synthetic event sent by widget it wants a full redraw exporect x pw core x exporect y pw core y exporect width pw core width exporect height pw core height else exporect x ev x exporect y ev y exporect width ev width exporect height ev height stuff deleted region now contains the exposure region xunionrectwithregion exporect pp exposure region pp exposure region else xunionregion region pp exposure region pp exposure region stuff deleted we need to clip on expose region for redrawing the grid xsetregion xtdisplayofobject pw pp plotarea gc pp exposure region stuff deleted check to see if child is exposed if xrectinregion pw plotter exposure region child core x child core y child core width child core height so i build up a region of exposures so that when i service my container widget redraw of rectobj children i only redraw what need to be redrawn it works for me hope this helps you brian brian dealy it not knowing where it s at dealy kong gsfc nasa gov that s important it s knowing uunet dftsrv kong dealy where it s not at b dylan
