[Previous] [Contents] [Next]

my_patfillrect()

fill a rectangle with a dithering pattern

Synopsis:

int my_patfillrect( int x1, int y1, 
                    int x2, int y2, 
                    char *fillpat );

Description:

This function fills a rectangle with a dithering pattern. This may be used to render fills with transparency patterns, or it may be called twice to blend two colors to produce a color that isn't in the palette.

The arguments are:

x1, y1
The coordinates of the upper-left corner of the rectangle.
x2, y2
The coordinates of the lower-right corner of the rectangle.
fillpat
The fill pattern. This is an array of 8 characters that defines an 8-bit * 8-bit pattern (fillpat[0] defines the first row of bits, fillpat[1] the second, and so on).

The points are given in source coordinates and needs to be converted to printer coordinates. If printing is done in landscape mode, you'll need to swap the x and y coordinates.

Returns:

1
Success.
0
The operation couldn't be done.

Classification:

Photon

Safety:
Interrupt handler Not applicable
Signal handler Not applicable
Thread Not applicable

[Previous] [Contents] [Next]