1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| void AddPolygonToClipRegion ( IFData *idata, MyPoint *Clip, int NClip )
{
IFData_X *xdata = (IFData_X *)idata->Parent ;
Region r1 ;
if ( Used_Clip == (Region)NULL ) /* 1er polygone : Initialisation */
{
Used_Clip = XPolygonRegion ( (XPoint *)Clip, NClip, WindingRule ) ;
XSetRegion ( xdata->dpy, xdata->gc, Used_Clip ) ;
XFlushGC ( xdata->dpy, xdata->gc ) ;
return ;
}
/* Polygones suivants */
r1 = XPolygonRegion ( (XPoint *)Clip, NClip, WindingRule ) ;
XSubtractRegion ( Used_Clip, r1, Used_Clip ) ;
XSetRegion ( xdata->dpy, xdata->gc, Used_Clip ) ;
XFlushGC ( xdata->dpy, xdata->gc ) ;
XDestroyRegion ( r1 ) ;
} |
Partager