[Previous] [Contents] [Next]

_Rect()

draw a rectangle in native printer coordinates

Synopsis:

int _Rect( int x, int y, 
           unsigned long color, 
           int w, int h );

Description:

This function draws a rectangle of the given color, width, and height, at the location given by x and y, in native printer coordinates.


Note: If your print filter takes over the drawing from the Render library, you'll need to provide this function.

Rectangles must be at least once source pixel. For example:

_Rect( _X(x), _Y(y), color, _X(x+1) - _X(x), _Y(y+1) - _Y(y) );

This function must check the bounds of the rectangle being drawn and clip it if necessary to fit into the drawing area.

Returns:

0
Success.
-1
Invalid area.

Classification:

Photon

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

See also:

my_bitmap.html(), my_drawline.html(), my_fillrect.html(), my_image.html(), my_setdrawmode.html(), my_setpixel_l.html(), my_setpixel_p.html(), my_string.html()


[Previous] [Contents] [Next]