PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the source code of this file.
Functions | |
int | Graph_start (void) |
void | Graph_stop (void) |
void | Graph_setup (uint32_t x_tiles, uint32_t y_tiles, uint32_t x_origin, uint32_t y_origin, uint32_t base_ptr) |
void | Graph_clear (void) |
void | Graph_copy (uint32_t dest_ptr) |
void | Graph_color (uint32_t c) |
void | Graph_width (uint32_t w) |
void | Graph_colorwidth (uint32_t c, uint32_t w) |
void | Graph_plot (uint32_t x, uint32_t y) |
void | Graph_line (uint32_t x, uint32_t y) |
void | Graph_arc (uint32_t x, uint32_t y, uint32_t xr, uint32_t yr, int angle, int anglestep, int steps, int arcmode) |
void | Graph_vec (uint32_t x, uint32_t y, int vecscale, int vecangle, uint16_t *vecdef_ptr) |
void | Graph_vecarc (uint32_t x, uint32_t y, uint32_t xr, uint32_t yr, int angle, int vecscale, int vecangle, uint16_t *vecdef_ptr) |
void | Graph_pix (uint32_t x, uint32_t y, int pixrot, uint16_t *pixdef_ptr) |
void | Graph_pixarc (uint32_t x, uint32_t y, uint32_t xr, uint32_t yr, int angle, int pixrot, uint16_t *pixdef_ptr) |
void | Graph_char (uint32_t x, uint32_t y, char ch) |
void | Graph_text (uint32_t x, uint32_t y, char *string_ptr) |
void | Graph_textarc (uint32_t x, uint32_t y, uint32_t xr, uint32_t yr, int angle, char *string_ptr) |
void | Graph_textmode (uint32_t x_scale, uint32_t y_scale, uint32_t spacing, uint32_t justification) |
void | Graph_box (int x, int y, int box_width, int box_height) |
void | Graph_quad (uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t x3, uint32_t y3, uint32_t x4, uint32_t y4) |
void | Graph_tri (uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, uint32_t x3, uint32_t y3) |
void | Graph_finish (void) |
void | fill (int x, int y, int da, int db, int db2, int linechange, int lines_minus_1) |
void | justify (char *string_ptr, uint32_t *justptr) |
void | sendCommand (GraphCmd_ET cmd, uint32_t *argptr) |
Variables | |
uint16_t | Graphics_Font [] |
HUBDATA GraphCmd_ST | gGraph |
HUBDATA uint32_t | pa [GRAPH_MAX_ARGS] |
HUBDATA uint32_t | Graph_colors [] |
HUBDATA uint8_t | Graph_pixels [] |
Graphics driver ported from Chip Gracy's Graphics.spin Users should comment out unused functions to save code space if necessary. Copyright (c) 2009, Steve Denson See end of file for MIT license terms.
Definition in file Graphics.c.
void fill | ( | int | x, |
int | y, | ||
int | da, | ||
int | db, | ||
int | db2, | ||
int | linechange, | ||
int | lines_minus_1 | ||
) |
void Graph_arc | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | xr, | ||
uint32_t | yr, | ||
int | angle, | ||
int | anglestep, | ||
int | steps, | ||
int | arcmode | ||
) |
draw an arc see header for API description.
Definition at line 268 of file Graphics.c.
void Graph_box | ( | int | x, |
int | y, | ||
int | box_width, | ||
int | box_height | ||
) |
draw a box with round/square corners according to pixel width see header for API description.
Definition at line 407 of file Graphics.c.
void Graph_char | ( | uint32_t | x, |
uint32_t | y, | ||
char | ch | ||
) |
draw char at x,y see header for API description.
Definition at line 345 of file Graphics.c.
void Graph_clear | ( | void | ) |
clear bitmap see header for API description.
Definition at line 178 of file Graphics.c.
void Graph_color | ( | uint32_t | c | ) |
set pixel color to two bit pattern see header for API description.
Definition at line 198 of file Graphics.c.
void Graph_colorwidth | ( | uint32_t | c, |
uint32_t | w | ||
) |
set pixel color and width see header for API description.
Definition at line 236 of file Graphics.c.
void Graph_copy | ( | uint32_t | dest_ptr | ) |
copy bitmap - use for double-buffered display see header for API description.
Definition at line 188 of file Graphics.c.
void Graph_finish | ( | void | ) |
make sure last command is done
Definition at line 502 of file Graphics.c.
void Graph_line | ( | uint32_t | x, |
uint32_t | y | ||
) |
draw a line to point x,y (from previous x,y?) see header for API description.
Definition at line 257 of file Graphics.c.
void Graph_pix | ( | uint32_t | x, |
uint32_t | y, | ||
int | pixrot, | ||
uint16_t * | pixdef_ptr | ||
) |
draw a pixel sprite see header for API description.
Definition at line 316 of file Graphics.c.
void Graph_pixarc | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | xr, | ||
uint32_t | yr, | ||
int | angle, | ||
int | pixrot, | ||
uint16_t * | pixdef_ptr | ||
) |
draw a pixel sprite at an arc position see header for API description.
Definition at line 329 of file Graphics.c.
void Graph_plot | ( | uint32_t | x, |
uint32_t | y | ||
) |
plot a pixel at point x,y see header for API description.
Definition at line 246 of file Graphics.c.
void Graph_quad | ( | uint32_t | x1, |
uint32_t | y1, | ||
uint32_t | x2, | ||
uint32_t | y2, | ||
uint32_t | x3, | ||
uint32_t | y3, | ||
uint32_t | x4, | ||
uint32_t | y4 | ||
) |
draw a solid quadrilateral see header for API description.
Definition at line 436 of file Graphics.c.
void Graph_setup | ( | uint32_t | x_tiles, |
uint32_t | y_tiles, | ||
uint32_t | x_origin, | ||
uint32_t | y_origin, | ||
uint32_t | base_ptr | ||
) |
set bitmap parameters see header for API description.
Definition at line 144 of file Graphics.c.
int Graph_start | ( | void | ) |
start graphics driver see header for API description.
Definition at line 73 of file Graphics.c.
void Graph_stop | ( | void | ) |
stop graphics driver see header for API description.
Definition at line 130 of file Graphics.c.
void Graph_text | ( | uint32_t | x, |
uint32_t | y, | ||
char * | string_ptr | ||
) |
draw text at x,y see header for API description.
Definition at line 356 of file Graphics.c.
void Graph_textarc | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | xr, | ||
uint32_t | yr, | ||
int | angle, | ||
char * | string_ptr | ||
) |
draw text at an arc position see header for API description.
Definition at line 373 of file Graphics.c.
void Graph_textmode | ( | uint32_t | x_scale, |
uint32_t | y_scale, | ||
uint32_t | spacing, | ||
uint32_t | justification | ||
) |
set text size and justification see header for API description.
Definition at line 393 of file Graphics.c.
void Graph_tri | ( | uint32_t | x1, |
uint32_t | y1, | ||
uint32_t | x2, | ||
uint32_t | y2, | ||
uint32_t | x3, | ||
uint32_t | y3 | ||
) |
Draw a solid triangle vertices must be ordered clockwise or counter-clockwise
x1 | - vertex x1 |
y1 | - vertex y1 |
x2 | - vertex x2 |
y2 | - vertex y2 |
x3 | - vertex x3 |
y3 | - vertex y3 |
Definition at line 442 of file Graphics.c.
void Graph_vec | ( | uint32_t | x, |
uint32_t | y, | ||
int | vecscale, | ||
int | vecangle, | ||
uint16_t * | vecdef_ptr | ||
) |
draw a vector see header for API description.
Definition at line 285 of file Graphics.c.
void Graph_vecarc | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | xr, | ||
uint32_t | yr, | ||
int | angle, | ||
int | vecscale, | ||
int | vecangle, | ||
uint16_t * | vecdef_ptr | ||
) |
draw a vector arc see header for API description.
Definition at line 299 of file Graphics.c.
void Graph_width | ( | uint32_t | w | ) |
set pixel width - actual width is w[3..0]+1 see header for API description.
Definition at line 207 of file Graphics.c.
void justify | ( | char * | string_ptr, |
uint32_t * | justptr | ||
) |
justify apparently aligns string edges
Definition at line 526 of file Graphics.c.
void sendCommand | ( | GraphCmd_ET | cmd, |
uint32_t * | argptr | ||
) |
send command to driver
cmd | - GraphCmd_ET command |
argptr | - arguments pointer |
Definition at line 565 of file Graphics.c.
HUBDATA GraphCmd_ST gGraph |
Graphics interface control structure
Definition at line 39 of file Graphics.c.
HUBDATA uint32_t Graph_colors[] |
Color codes
Definition at line 49 of file Graphics.c.
HUBDATA uint8_t Graph_pixels[] |
Round pixel recipes
Definition at line 60 of file Graphics.c.
uint16_t Graphics_Font[] |
'' '' Theory of Operation: '' '' A cog is launched with code contained in Graphics_Array[] which '' processes commands sent by the Graph_* API wrapper functions. '' '' Points, lines, arcs, sprites, text, and polygons are rasterized into '' a specified stretch of memory which serves as a generic bitmap buffer. '' '' The bitmap can be displayed by the TV or VGA driver. '' To date, the C library version has been tested on TV only. '' '' See GraphicsTest.c for usage example. '' Graphics_Font is the character set in separate GraphicsFont.c file
Vector font - standard Graph_ascii characters ($21-$7E)
Definition at line 13 of file GraphicsFont.c.