Solaris X Window System Developer's Guide

Filling an Area Using the Source Area Paint Type

The XSolarisOvlCopyPaintType routine uses the paint type information of a specified rectangle in a source rectangle to control a fill operation in a specified rectangle in a destination rectangle. The source rectangle and destination rectangle can be any type of drawable. If the source rectangle is a transparent overlay, the paint type attribute of its pixels is used as the source of the copy, and the color information is ignored. If the source rectangle is any other type of drawable, the bit plane specified in the routine is treated as if it were paint type data and it is used for the copy. In this case, the bit plane must have only one bit set.

The syntax and arguments are shown below.

void

XSolarisOvlCopyPaintType(Display *display, Drawable src, 

		Drawable dst, GC gc, int src_x, int src_y, 

		unsigned int width, unsigned int height, int dest_x,

		int dest_y, unsigned long action, unsigned long

plane)

display

Specifies the connection to the X server. 

src

Specifies the source drawable from which to obtain the paint type information. 

dst

Specifies the destination drawable. 

gc

Specifies the GC. 

src_x, src_y

Specify the x and y coordinates of the upper-left corner of the source rectangle relative to the origin of the source drawable. 

width, height

Specify the width and height of both the source and destination rectangles. 

dest_x, dest_y

Specify the x and y coordinates of the upper-left corner of the destination rectangle relative to the origin of the destination drawable. 

action

Specifies which paint type data is to be copied. This can be one of XSolarisOvlCopyOpaque, XSolarisOvlCopyTransparent, or XSolarisOvlCopyAll.

plane

Specifies the bit-plane of the src drawable to be used as paint type information when the source is not a transparent overlay.

src and dst must have the same screen, or a BadMatch error results.

Table 6–3 summarizes the possible combinations of src and dst and their actions. The left side of the table shows the possible src combinations. The top of the table shows the possible dst combinations. The actions A1-A4 are explained following the table.

Table 6–3 XSolarisOvlCopyPaintType Source/Destination Combinations and Actions

Source/Destination 

Overlay 

Drawable 

overlay 

A1 

A2 

drawable 

A3 

A4 

The action argument specifies whether opaque paint (XSolarisOvlCopyOpaque), transparent paint (XSolarisOvlCopyTransparent), or both (XSolarisOvlCopyAll) should be operated upon. This allows a client to accumulate opaque or transparent paint.

If portions of the source rectangle are obscured or are outside the boundaries of the source drawable, the server generates Expose events, using the same semantics as XCopyArea.

This routine uses these GC components: function, plane-mask, fill-style, subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin, and clip-mask. It might use these GC mode-dependent components: foreground, background, tile, stipple, tile-stipple-x-origin, tile-stipple-y-origin.

XSolarisOvlCopyPaintType can generate BadDrawable, BadGC, BadMatch, and BadValue errors.