man prim () -
NAME
Primitives drawing -
Functions
void caca_draw_line (int, int, int, int, char)
Draw a line on the screen using the given character.
void caca_draw_polyline (int const x[], int const y[], int, char)
Draw a polyline on the screen using the given character and coordinate arrays. The first and last points are not connected, so in order to draw a polygon you need to specify the starting point at the end of the list as well.
void caca_draw_thin_line (int, int, int, int)
Draw a thin line on the screen, using ASCII art.
void caca_draw_thin_polyline (int const x[], int const y[], int)
Draw a thin polyline on the screen using the given coordinate arrays and with ASCII art. The first and last points are not connected, so in order to draw a polygon you need to specify the starting point at the end of the list as well.
void caca_draw_circle (int, int, int, char)
Draw a circle on the screen using the given character.
void caca_draw_ellipse (int, int, int, int, char)
Draw an ellipse on the screen using the given character.
void caca_draw_thin_ellipse (int, int, int, int)
Draw a thin ellipse on the screen.
void caca_fill_ellipse (int, int, int, int, char)
Fill an ellipse on the screen using the given character.
void caca_draw_box (int, int, int, int, char)
Draw a box on the screen using the given character.
void caca_draw_thin_box (int, int, int, int)
Draw a thin box on the screen.
void caca_fill_box (int, int, int, int, char)
Fill a box on the screen using the given character.
void caca_draw_triangle (int, int, int, int, int, int, char)
Draw a triangle on the screen using the given character.
void caca_draw_thin_triangle (int, int, int, int, int, int)
Draw a thin triangle on the screen.
void caca_fill_triangle (int, int, int, int, int, int, char)
Fill a triangle on the screen using the given character.
Detailed Description
These functions provide routines for primitive drawing, such as lines, boxes, triangles and ellipses.
Function Documentation
void caca_draw_box (int x1, int y1, int x2, int y2, char c)
Parameters:
x1 X coordinate of the upper-left corner of the box.
y1 Y coordinate of the upper-left corner of the box.
x2 X coordinate of the lower-right corner of the box.
y2 Y coordinate of the lower-right corner of the box.
c Character to draw the box outline with.
Returns: void
void caca_draw_circle (int x, int y, int r, char c)
Parameters:
x Center X coordinate.
y Center Y coordinate.
r Circle radius.
c Character to draw the circle outline with.
Returns: void
void caca_draw_ellipse (int xo, int yo, int a, int b, char c)
Parameters:
xo Center X coordinate.
yo Center Y coordinate.
a Ellipse X radius.
b Ellipse Y radius.
c Character to draw the ellipse outline with.
Returns: void
void caca_draw_line (int x1, int y1, int x2, int y2, char c)
Parameters:
x1 X coordinate of the first point.
y1 Y coordinate of the first point.
x2 X coordinate of the second point.
y2 Y coordinate of the second point.
c Character to draw the line with.
Returns: void
void caca_draw_polyline (int const x[], int const y[], int n, char c)
Parameters:
x Array of X coordinates. Must have n + 1 elements.
y Array of Y coordinates. Must have n + 1 elements.
n Number of lines to draw.
c Character to draw the lines with.
Returns: void
void caca_draw_thin_box (int x1, int y1, int x2, int y2)
Parameters:
x1 X coordinate of the upper-left corner of the box.
y1 Y coordinate of the upper-left corner of the box.
x2 X coordinate of the lower-right corner of the box.
y2 Y coordinate of the lower-right corner of the box.
Returns: void
void caca_draw_thin_ellipse (int xo, int yo, int a, int b)
Parameters:
xo Center X coordinate.
yo Center Y coordinate.
a Ellipse X radius.
b Ellipse Y radius.
Returns: void
void caca_draw_thin_line (int x1, int y1, int x2, int y2)
Parameters:
x1 X coordinate of the first point.
y1 Y coordinate of the first point.
x2 X coordinate of the second point.
y2 Y coordinate of the second point.
Returns: void
void caca_draw_thin_polyline (int const x[], int const y[], int n)
Parameters:
x Array of X coordinates. Must have n + 1 elements.
y Array of Y coordinates. Must have n + 1 elements.
n Number of lines to draw.
Returns: void
void caca_draw_thin_triangle (int x1, int y1, int x2, int y2, int x3, int y3)
Parameters:
x1 X coordinate of the first point.
y1 Y coordinate of the first point.
x2 X coordinate of the second point.
y2 Y coordinate of the second point.
x3 X coordinate of the third point.
y3 Y coordinate of the third point.
Returns: void
void caca_draw_triangle (int x1, int y1, int x2, int y2, int x3, int y3, char c)
Parameters:
x1 X coordinate of the first point.
y1 Y coordinate of the first point.
x2 X coordinate of the second point.
y2 Y coordinate of the second point.
x3 X coordinate of the third point.
y3 Y coordinate of the third point.
c Character to draw the triangle outline with.
Returns: void
void caca_fill_box (int x1, int y1, int x2, int y2, char c)
Parameters:
x1 X coordinate of the upper-left corner of the box.
y1 Y coordinate of the upper-left corner of the box.
x2 X coordinate of the lower-right corner of the box.
y2 Y coordinate of the lower-right corner of the box.
c Character to fill the box with.
Returns: void
void caca_fill_ellipse (int xo, int yo, int a, int b, char c)
Parameters:
xo Center X coordinate.
yo Center Y coordinate.
a Ellipse X radius.
b Ellipse Y radius.
c Character to fill the ellipse with.
Returns: void
void caca_fill_triangle (int x1, int y1, int x2, int y2, int x3, int y3, char c)
Parameters:
x1 X coordinate of the first point.
y1 Y coordinate of the first point.
x2 X coordinate of the second point.
y2 Y coordinate of the second point.
x3 X coordinate of the third point.
y3 Y coordinate of the third point.
c Character to fill the triangle with.
Returns: void