bx-lib : the Basic X11 Library tuned for C beginners  1.0
Functions
Drawing complex shapes (polygons, Bezier curves...)
Drawing (what you can do with a pen on a canvas)

Functions

void bx_draw_polygon (bx_window win, int n, int x[], int y[], bx_closure closed, bx_fill filled)
void bx_draw_bezier (bx_window window, int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
void bx_draw_bezier2 (bx_window window, int x0, int y0, int x1, int y1, int x2, int y2)
void bx_draw_curve (bx_window window, int n, int x[], int y[], bx_closure closed, bx_fill filled)
void bx_draw_curve2 (bx_window window, int n, int x[], int y[], bx_closure closed, bx_fill filled)
void bx_draw_curvei (bx_window window, int n, int x[], int y[], bx_closure closed, bx_fill filled, double beta)

Detailed Description

Function Documentation

void bx_draw_polygon ( bx_window  win,
int  n,
int  x[],
int  y[],
bx_closure  closed,
bx_fill  filled 
)

Draws the contour or the interior of a polygon on the canvas of a window.

Parameters
winthe window owning the targetted canvas.
nthe number of points in the polygon.
xthe array of x-coordinates of the n points.
ythe array of y-coordinates of the n points.
closedwhether contour of the polygon should be closed or not.
filledeither fills the interior (=1) or draws the contour (=0).
void bx_draw_bezier ( bx_window  window,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

Draws a Bezier curve of 3rd order (controlled by 4 points)

void bx_draw_bezier2 ( bx_window  window,
int  x0,
int  y0,
int  x1,
int  y1,
int  x2,
int  y2 
)

Draws a Bezier curve of 2nd order (controlled by 3 points)

void bx_draw_curve ( bx_window  window,
int  n,
int  x[],
int  y[],
bx_closure  closed,
bx_fill  filled 
)

Draws a approximation curve controlled by n points and made of a smooth succession Bezier curves of 3rd order.

void bx_draw_curve2 ( bx_window  window,
int  n,
int  x[],
int  y[],
bx_closure  closed,
bx_fill  filled 
)

Draws a approximation curve controlled by n points and made of a smooth succession Bezier curves of 2nd order.

void bx_draw_curvei ( bx_window  window,
int  n,
int  x[],
int  y[],
bx_closure  closed,
bx_fill  filled,
double  beta 
)

Draws a interpolation curve controlled by n points and made of a smooth succession Bezier curves of 3rd order.