bx-lib : the Basic X11 Library tuned for C beginners
1.0
|
Functions | |
void | bx_draw_point (bx_window win, int x, int y) |
void | bx_draw_line (bx_window win, int x1, int y1, int x2, int y2) |
void | bx_draw_box (bx_window win, int x, int y, unsigned w, unsigned h, bx_fill filled) |
void | bx_draw_circle (bx_window win, int x, int y, unsigned w, unsigned h, bx_fill filled) |
void | bx_draw_arc (bx_window win, int x, int y, unsigned w, unsigned h, double angle, double dangle, bx_fill filled) |
void bx_draw_point | ( | bx_window | win, |
int | x, | ||
int | y | ||
) |
Draws a point on the canvas of a window.
win | the window owning the targeted canvas. |
x,y | the coordinates of the point to draw. |
void bx_draw_line | ( | bx_window | win, |
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Draws a line segment on the canvas of a window.
win | the window owning the targeted canvas. |
x1,y1 | the coordinates of the 1st end-point of the segment. |
x2,y2 | the coordinates of the 2nd end-point of the segment. |
Draws a rectangle on the canvas of a window, whose interior may be filled or left empty.
win | the window owning the targeted canvas. |
x,y | the coordinates of the top left corner of the rectangle. |
w,h | the width and height (minus 1) of the rectangle, so that the bottom-right corner of the bounding-box is located at (x+w, y+h). |
filled | whether the interior of the rectangle is filled (no-zero) or left empty (zero) |
Draws an ellipse on the canvas of a window, whose interior may be filled or left empty.
win | the window owning the targeted canvas. |
x,y | the coordinates of the top left corner of the bounding box of the ellipse. |
w,h | the width and height (minus 1) of the bounding box of the ellipse, so that the bottom-right corner of the bounding-box is located at (x+w, y+h). |
filled | whether theellipse is filled (non zero) or empty (zero) |
void bx_draw_arc | ( | bx_window | win, |
int | x, | ||
int | y, | ||
unsigned | w, | ||
unsigned | h, | ||
double | angle, | ||
double | dangle, | ||
bx_fill | filled | ||
) |
Draws an arc on the canvas of a window, that is a portion of an ellipse between two angles, and whose interior may be filled (to look as a pie slice) or left empty.
win | the window owning the targeted canvas. |
x,y | the coordinates of the top left corner of the bounding box of the underlying ellipse of the arc. |
w,h | the width and height (minus 1) of the bounding box of the underlying ellipse of the arc, so that the bottom-right corner of the box is located at (x+w, y+h). |
angle | the starting angle of the arc, expressed in degrees from the 3 o'clock position on the underlying ellipse of the arc. |
dangle | the angle between the starting angle and the ending angle of the arc expressed in degrees |
filled | whether theellipse is filled (non zero) or empty (zero) |