[Previous] [Contents] [Next]

my_patline()

draw a line with a dithering pattern

Synopsis:

int my_patline( int x, int y, 
                int w, int pat );

Description:

This function draws a line with a dithering pattern. This may be used to render lines 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:

x
The x argument from a call to my_bitmap().
y
The y argument from a call to my_bitmap().
w
The xsize argument from a call to my_bitmap(). The ysize argument is set to 1, so the result is a patterned horizontal line of one bit thickness and of w width.
pat
The dithering pattern. This is an array of 8 characters that defines an 8-bit * 8-bit pattern (pat[0] defines the first row of bits, pat[1] the second, and so on).

The point is 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

See also:

my_bitmap()


[Previous] [Contents] [Next]