This chapter presents the general drawing functions of OSLib. They help you to draw lines, rectangles, gradients, etc.
void oslDrawLine(int x0, int y0, int x1, int y1, OSL_COLOR color);
Draw a line of the specified color, between points (x0, y0) (included) and (x1, y1) (not included). Usualy for all the rectangular drawing functions, points x0, y0 are included whereas points x1, y1 aren't. For example a rectangle of 1x1 (1 pixel) at the point 10,10 is drawn like this: oslDrawFillRect (10,10,11,11, color);
void oslDrawRect(int x0, int y0, int x1, int y1, OSL_COLOR color);
Draw a frame (empty rectangle) between the (x0,y0) and (x1,y1) points.
void oslDrawFillRect(int x0, int y0, int x1, int y1, OSL_COLOR color);
Draw a filled rectangle between the (x0,y0) and (x1,y1) points.
void oslDrawGradientRect(int x0, int y0, int x1, int y1, OSL_COLOR c1, OSL_COLOR c2, OSL_COLOR c3, OSL_COLOR c4);
Draw a four-point gradient between the points (x0,y0) and (x1,y1) with as upper-left color c1, upper-right c2, lower-left c3 et lower-right c4.