Next: , Previous: Colormap, Up: Top


7 Rendering

— Function: x:flush display
— Function: x:flush window

Flushes the output buffer. Some client applications need not use this function because the output buffer is automatically flushed as needed by calls to X:Pending, X:Next-Event, and X:Window-Event. Events generated by the server may be enqueued into the library's event queue. — Function: x:flush gc

Forces sending of GC component changes.

Xlib usually defers sending changes to the components of a GC to the server until a graphics function is actually called with that GC. This permits batching of component changes into a single server request. In some circumstances, however, it may be necessary for the client to explicitly force sending the changes to the server. An example might be when a protocol extension uses the GC indirectly, in such a way that the extension interface cannot know what GC will be used.

— Function: x:clear-area window (x-pos y-pos) (width height) expose?

Paints a rectangular area in the specified window according to the specified dimensions with the window's background pixel or pixmap. The subwindow-mode effectively is ‘x:Clip-By-Children’. If width is zero, it is replaced with the current width of the window minus x. If height is zero, it is replaced with the current height of the window minus y. If the window has a defined background tile, the rectangle clipped by any children is filled with this tile. If the window has background x:None, the contents of the window are not changed. In either case, if expose? is True, one or more x:Expose events are generated for regions of the rectangle that are either visible or are being retained in a backing store. If you specify a window whose class is x:Input-Only, an error results.

— Function: x:fill-rectangle window gcontext position size

Draw Strings

— Function: x:draw-string drawable gc position string

Position specifies coordinates relative to the origin of drawable of the origin of the first character to be drawn.

x:draw-string draws the characters of string, starting at position.

— Function: x:image-string drawable gc position string

Position specifies coordinates relative to the origin of drawable of the origin of the first character to be drawn.

x:image-string draws the characters and background of string, starting at position.

Draw Shapes

— Function: x:draw-points drawable gc position ...

Position ... specifies coordinates of the point to be drawn. — Function: x:draw-points drawable gc x y ...

(x, y) ... specifies coordinates of the point to be drawn. — Function: x:draw-points drawable gc point-array

point-array is a uniform short array of rank 2, whose rightmost index spans a range of 2.

The X:Draw-Points procedure uses the foreground pixel and function components of the gc to draw points into drawable at the positions (relative to the origin of drawable) specified.

X:Draw-Points uses these gc components: function, planemask, foreground, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.

— Function: x:draw-segments drawable gc pos1 pos2 ...

Pos1, pos2, ... specify coordinates to be connected by segments. — Function: x:draw-segments drawable gc x1 y1 x2 y2 ...

(x1, y1), (x2, y2) ... specify coordinates to be connected by segments. — Function: x:draw-segments drawable gc point-array

point-array is a uniform short array of rank 2, whose rightmost index spans a range of 2.

The X:Draw-Segments procedure uses the components of the specified gc to draw multiple unconnected lines between disjoint adjacent pair of points passed as arguments. It draws the segments in order and does not perform joining at coincident endpoints. For any given line, X:Draw-Segments does not draw a pixel more than once. If thin (zero line-width) segments intersect, the intersecting pixels are drawn multiple times. If wide segments intersect, the intersecting pixels are drawn only once, as though the entire PolyLine protocol request were a single, filled shape. X:Draw-Segments treats all coordinates as relative to the origin of drawable.

X:Draw-Segments uses these gc components: function, plane-mask, line-width, line-style, cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask, join-style. It also use these gc mode-dependent components: foreground, background, tile, stipple, tilestipple-x-origin, tile-stipple-y-origin, dash-offset, and dash-list.

— Function: x:draw-lines drawable gc pos1 pos2 ...

Pos1, pos2, ... specify coordinates to be connected by lines. — Function: x:draw-lines drawable gc x1 y1 x2 y2 ...

(x1, y1), (x2, y2) ... specify coordinates to be connected by lines. — Function: x:draw-lines drawable gc point-array

point-array is a uniform short array of rank 2, whose rightmost index spans a range of 2.

The X:Draw-Lines procedure uses the components of the specified gc to draw lines between each adjacent pair of points passed as arguments. It draws the lines in order. The lines join correctly at all intermediate points, and if the first and last points coincide, the first and last lines also join correctly. For any given line, X:Draw-Lines does not draw a pixel more than once. If thin (zero line-width) lines intersect, the intersecting pixels are drawn multiple times. If wide lines intersect, the intersecting pixels are drawn only once, as though the entire PolyLine protocol request were a single, filled shape. X:Draw-Lines treats all coordinates as relative to the origin of drawable.

X:Draw-Lines uses these gc components: function, plane-mask, line-width, line-style, cap-style, fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask, join-style. It also use these gc mode-dependent components: foreground, background, tile, stipple, tilestipple-x-origin, tile-stipple-y-origin, dash-offset, and dash-list.

— Function: x:fill-polygon drawable gc pos1 pos2 ...

Pos1, pos2, ... specify coordinates of the border path. — Function: x:fill-polygon drawable gc x1 y1 x2 y2 ...

(x1, y1), (x2, y2) ... specify coordinates of the border path. — Function: x:fill-polygon drawable gc point-array

point-array is a uniform short array of rank 2, whose rightmost index spans a range of 2.

The path is closed automatically if the last point in the list or point-array does not coincide with the first point.

The X:Fill-Polygon procedure uses the components of the specified gc to fill the region closed by the specified path. X:Fill-Polygon does not draw a pixel of the region more than once. X:Fill-Polygon treats all coordinates as relative to the origin of drawable.

X:Fill-Polygon uses these gc components: function, planemask, fill-style, fill-rule, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. It also use these gc mode-dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, and tile-stipple-y-origin.