我认为这是用于剪辑的内容,但我找不到任何示例来执行此操作。 我需要:
答案 0 :(得分:1)
您可以使用XSetClipRectangles()
引用here和XSetClipMask()
引用here
所以:
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
。