2012-01-27 5 views

答えて

1

をGCを設定するを描きます

XSetClipRectangles()だから、 here

を参照hereXSetClipMask()を参照を使用して

Display dpy; //This is your display, we'll assume it is a valid Display 
GC gc; //This is your GC, we'll assume it is a valid GC 
XRectangle recs[]; //This is an array containing the clipping regions you want. 
int recs_n; //This is the number of rectangles in the 'recs' array. 

XSetClipRectangles(dpy, gc, 0, 0, recs, recs_n, Unsorted); //Enable clipping 
drawMyClippedGraphics(); //Call to whatever you want to use for drawing 
XSetClipMask(dpy, gc, None); //Restore the GC 

詳細については、端末にman functionNameと入力してください。

+0

あなたはGCを復元していません。クリップマスクを削除するだけです。 XGetGCValues()を使ってGCのクリップマスクを取得する方法がないことが分かります。とにかくありがとう。 – knarf

関連する問題