EE445M RTOS
Taken at the University of Texas Spring 2015
|
Spatial and geometric modeling library. More...
Data Structures | |
struct | point |
Representation of an ordered pair with a shade. More... | |
struct | shape |
Representation of a shape. More... | |
struct | circle |
Representation of a circle. More... | |
Functions | |
void | shape_destroy_point (point *p) |
void | shape_destroy_circle (circle *cir) |
point * | shape_create_point (ushort, ushort, shade_t) |
point * | shape_duplicate_point (point *p) |
shape * | shape_create (ushort,...) |
shape * | shape_duplicate_shape (shape *) |
void | shape_destroy_shape (shape *) |
circle * | shape_create_circle (ushort, point *) |
shape * | shape_create_triangle (point *, point *, point *) |
shape * | shape_create_quad (point *, uchar, uchar) |
Spatial and geometric modeling library.
Graphics framework for describing 2D systems.
Return a pointer to a shape with numPoints points.
numpoints | Number of vertices in this polygon |
points... | Comma separated point-defined polygon |
Definition at line 31 of file shape.c.
References shape::num_points, and shape::points.
Referenced by CHToShape(), shape_create_quad(), and shape_create_triangle().
Return a pointer to a circle in memory described by center and radius.
center | Point describing the center of the circle |
radius | Length of the radius in units |
Definition at line 58 of file shape.c.
References circle::center, and circle::radius.
Return a point that describes the given arguments.
x | x coordinate |
y | y coordinate |
shade | shading of this point |
Definition at line 6 of file shape.c.
References point::shade, point::x, and point::y.
Referenced by _FBDrawGraphBounds(), _FBDrawGraphData(), FBDrawFullscreenGraph(), FBEraseFullscreenGraph(), FBEraseFullscreenGraphData(), shape_create_quad(), and shape_duplicate_point().
A handy function to create a general quadrilateral.
top_left_corner | Coordinates of the top left corner of the quadrilateral |
width | Width of the quadrilateral |
p2 | height Height of the quadrilateral |
Definition at line 19 of file shape.c.
References point::shade, shade_t, shape_create(), shape_create_point(), point::x, and point::y.
A handy function to create a triangle.
p0 | Vertex a |
p1 | Vertex b |
p2 | Vertex c |
Definition at line 14 of file shape.c.
References shape_create().
|
inline |
|
inline |
void shape_destroy_shape | ( | shape * | ) |
Destroy a shape object.
sh | Shape object to destroy |
Definition at line 49 of file shape.c.
References shape::num_points, and shape::points.
Duplicate a point
p | Point to duplicate |
Definition at line 77 of file shape.h.
References point::shade, shape_create_point(), point::x, and point::y.
Referenced by _fb_draw_line(), _fb_draw_string(), CHCreateClockHand(), CHDuplicateClockHand(), fb_erase_char(), and fb_erase_string().
Duplicate a shape object.
shape | The shape to duplicate |
Definition at line 66 of file shape.c.
References shape::num_points, and shape::points.
Referenced by CHDuplicateClockHand().