1XSetClipOrigin(3X11)            XLIB FUNCTIONS            XSetClipOrigin(3X11)
2
3
4

NAME

6       XSetClipOrigin, XSetClipMask, XSetClipRectangles - GC convenience rou‐
7       tines
8

SYNTAX

10       int XSetClipOrigin(Display *display, GC gc, int clip_x_origin, int
11              clip_y_origin);
12
13       int XSetClipMask(Display *display, GC gc, Pixmap pixmap);
14
15       int XSetClipRectangles(Display *display, GC gc, int clip_x_origin, int
16              clip_y_origin, XRectangle rectangles[], int n, int ordering);
17

ARGUMENTS

19       display   Specifies the connection to the X server.
20
21       clip_x_origin
22       clip_y_origin
23                 Specify the x and y coordinates of the clip-mask origin.
24
25       gc        Specifies the GC.
26
27       n         Specifies the number of rectangles.
28
29       ordering  Specifies the ordering relations on the rectangles.  You can
30                 pass Unsorted, YSorted, YXSorted, or YXBanded.
31
32       pixmap    Specifies the pixmap or None.
33
34       rectangles
35                 Specifies an array of rectangles that define the clip-mask.
36

DESCRIPTION

38       The XSetClipOrigin function sets the clip origin in the specified GC.
39       The clip-mask origin is interpreted relative to the origin of whatever
40       destination drawable is specified in the graphics request.
41
42       XSetClipOrigin can generate BadAlloc and BadGC errors.
43
44       The XSetClipMask function sets the clip-mask in the specified GC to the
45       specified pixmap.  If the clip-mask is set to None, the pixels are are
46       always drawn (regardless of the clip-origin).
47
48       XSetClipMask can generate BadAlloc, BadGC, BadMatch, and BadValue
49       errors.
50
51       The XSetClipRectangles function changes the clip-mask in the specified
52       GC to the specified list of rectangles and sets the clip origin.  The
53       output is clipped to remain contained within the rectangles.  The clip-
54       origin is interpreted relative to the origin of whatever destination
55       drawable is specified in a graphics request.  The rectangle coordinates
56       are interpreted relative to the clip-origin.  The rectangles should be
57       nonintersecting, or the graphics results will be undefined.  Note that
58       the list of rectangles can be empty, which effectively disables output.
59       This is the opposite of passing None as the clip-mask in XCreateGC,
60       XChangeGC, and XSetClipMask.
61
62       If known by the client, ordering relations on the rectangles can be
63       specified with the ordering argument.  This may provide faster opera‐
64       tion by the server.  If an incorrect ordering is specified, the X
65       server may generate a BadMatch error, but it is not required to do so.
66       If no error is generated, the graphics results are undefined.  Unsorted
67       means the rectangles are in arbitrary order.  YSorted means that the
68       rectangles are nondecreasing in their Y origin.  YXSorted additionally
69       constrains YSorted order in that all rectangles with an equal Y origin
70       are nondecreasing in their X origin.  YXBanded additionally constrains
71       YXSorted by requiring that, for every possible Y scanline, all rectan‐
72       gles that include that scanline have an identical Y origins and Y
73       extents.
74
75       XSetClipRectangles can generate BadAlloc, BadGC, BadMatch, and BadValue
76       errors.
77

DIAGNOSTICS

79       BadAlloc  The server failed to allocate the requested resource or
80                 server memory.
81
82       BadGC     A value for a GContext argument does not name a defined GCon‐
83                 text.
84
85       BadMatch  Some argument or pair of arguments has the correct type and
86                 range but fails to match in some other way required by the
87                 request.
88
89       BadValue  Some numeric value falls outside the range of values accepted
90                 by the request.  Unless a specific range is specified for an
91                 argument, the full range defined by the argument's type is
92                 accepted.  Any argument defined as a set of alternatives can
93                 generate this error.
94

SEE ALSO

96       XCreateGC(3X11), XDrawRectangle(3X11), XQueryBestSize(3X11), XSetArc‐
97       Mode(3X11), XSetFillStyle(3X11), XSetFont(3X11), XSetLineAt‐
98       tributes(3X11), XSetState(3X11), XSetTile(3X11)
99       Xlib - C Language X Interface
100
101
102
103X Version 11                     libX11 1.0.3             XSetClipOrigin(3X11)
Impressum