|
GLCD Library
A C Library for Embedded Applications
|
Graphics specific functions such as drawing lines, circles, rectangles etc. More...
Functions | |
| void | glcd_draw_bitmap (const unsigned char *data) |
| Draw bitmap to screen buffer. More... | |
| void | glcd_draw_circle (uint8_t x0, uint8_t y0, uint8_t r, uint8_t color) |
| Draw circle but do not fill. More... | |
| void | glcd_draw_line (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color) |
| Draw line. More... | |
| void | glcd_draw_rect (uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color) |
| Draw rectangle but do not fill. More... | |
| void | glcd_draw_rect_shadow (uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color) |
| Draw rectangle but do not fill. More... | |
| void | glcd_draw_rect_thick (uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t tx, uint8_t ty, uint8_t color) |
| Draw rectangle but do not fill. More... | |
| void | glcd_fill_circle (uint8_t x0, uint8_t y0, uint8_t r, uint8_t color) |
| Draw circle and fill. More... | |
| void | glcd_fill_rect (uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color) |
| Draw rectangle and fill with colour. More... | |
| uint8_t | glcd_get_pixel (uint8_t x, uint8_t y) |
| Get state of pixel from specified location. More... | |
| void | glcd_invert_area (uint8_t x, uint8_t y, uint8_t w, uint8_t h) |
| Invert pixels in a retangular area. More... | |
| void | glcd_invert_pixel (uint8_t x, uint8_t y) |
| Invert state of pixel of specified location. More... | |
| void | glcd_set_pixel (uint8_t x, uint8_t y, uint8_t color) |
| Set pixel to specified colour. More... | |
Graphics specific functions such as drawing lines, circles, rectangles etc.
| void glcd_draw_bitmap | ( | const unsigned char * | data | ) |
Draw bitmap to screen buffer.
Note this will draw to the entire buffer, its not yet possible to draw partially to the LCD. Not yet supported with AVR pgmspace.
| data | Pointer to bitmap data. |
Definition at line 279 of file graphics.c.
Referenced by glcd_test_bitmap_128x64().
| void glcd_draw_circle | ( | uint8_t | x0, |
| uint8_t | y0, | ||
| uint8_t | r, | ||
| uint8_t | color | ||
| ) |
Draw circle but do not fill.
The border of the rectangle is the same as fill colour
| x0 | Centre x-coordinate (left-most) |
| y0 | Centre y-coordinate (top-most) |
| r | Radius |
| color | Colour of border |
Definition at line 190 of file graphics.c.
| void glcd_draw_line | ( | uint8_t | x0, |
| uint8_t | y0, | ||
| uint8_t | x1, | ||
| uint8_t | y1, | ||
| uint8_t | color | ||
| ) |
Draw line.
| x0 | Start x-coordinate |
| y0 | Start y-coordinate |
| x1 | End x-coordinate |
| y1 | End y-coordinate |
| color | Colour to set pixels |
Definition at line 85 of file graphics.c.
Referenced by glcd_draw_rect_shadow(), and glcd_scrolling_bar_graph().
| void glcd_draw_rect | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | w, | ||
| uint8_t | h, | ||
| uint8_t | color | ||
| ) |
Draw rectangle but do not fill.
The border of the rectangle is the same as fill colour
| x | Start x-coordinate (left-most) |
| y | Start y-coordinate (top-most) |
| w | Width |
| h | Height |
| color | Colour of border |
Definition at line 140 of file graphics.c.
Referenced by glcd_bar_graph_horizontal(), glcd_bar_graph_vertical(), glcd_draw_rect_shadow(), glcd_scrolling_bar_graph(), and glcd_test_rectangles().
| void glcd_draw_rect_shadow | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | w, | ||
| uint8_t | h, | ||
| uint8_t | color | ||
| ) |
Draw rectangle but do not fill.
Place a shadow line on the bottom-right of the window. The border of the rectangle is the same as fill colour
| x | Start x-coordinate (left-most) |
| y | Start y-coordinate (top-most) |
| w | Width |
| h | Height |
| color | Colour of border |
Definition at line 183 of file graphics.c.
Referenced by glcd_test_rectangles().
| void glcd_draw_rect_thick | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | w, | ||
| uint8_t | h, | ||
| uint8_t | tx, | ||
| uint8_t | ty, | ||
| uint8_t | color | ||
| ) |
Draw rectangle but do not fill.
User specified thickness. The border of the rectangle is the same as fill colour
| x | Start x-coordinate (left-most) |
| y | Start y-coordinate (top-most) |
| w | Width (outermost pixels) |
| h | Height |
| tx | Thickness of horizontal border along X axis |
| ty | Thickness of vertical border along Y axis |
| color | Colour of border |
Definition at line 154 of file graphics.c.
Referenced by glcd_test_rectangles().
| void glcd_fill_circle | ( | uint8_t | x0, |
| uint8_t | y0, | ||
| uint8_t | r, | ||
| uint8_t | color | ||
| ) |
Draw circle and fill.
The border of the rectangle is the same as fill colour
| x0 | Centre x-coordinate (left-most) |
| y0 | Centre y-coordinate (top-most) |
| r | Radius |
| color | Colour of border |
Definition at line 229 of file graphics.c.
Referenced by glcd_test_circles().
| void glcd_fill_rect | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | w, | ||
| uint8_t | h, | ||
| uint8_t | color | ||
| ) |
Draw rectangle and fill with colour.
The border of the rectangle is the same as fill colour
| x | Start x-coordinate (left-most) |
| y | Start y-coordinate (top-most) |
| w | Width |
| h | Height |
| color | Colour to fill with |
Definition at line 128 of file graphics.c.
Referenced by glcd_bar_graph_horizontal(), glcd_bar_graph_horizontal_no_border(), glcd_bar_graph_vertical(), and glcd_bar_graph_vertical_no_border().
| uint8_t glcd_get_pixel | ( | uint8_t | x, |
| uint8_t | y | ||
| ) |
Get state of pixel from specified location.
| x | X-coordinate |
| y | Y-coordinate |
Definition at line 64 of file graphics.c.
Referenced by glcd_scrolling_bar_graph().
| void glcd_invert_area | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | w, | ||
| uint8_t | h | ||
| ) |
Invert pixels in a retangular area.
| x | Start x-coordinate (left-most) |
| y | Start y-coordinate (top-most) |
| w | Width |
| h | Height |
Definition at line 267 of file graphics.c.
Referenced by glcd_tiny_invert_line().
| void glcd_invert_pixel | ( | uint8_t | x, |
| uint8_t | y | ||
| ) |
Invert state of pixel of specified location.
| x | X-coordinate |
| y | Y-coordinate |
Definition at line 76 of file graphics.c.
Referenced by glcd_invert_area().
| void glcd_set_pixel | ( | uint8_t | x, |
| uint8_t | y, | ||
| uint8_t | color | ||
| ) |
Set pixel to specified colour.
| x | X-coordinate |
| y | Y-coordinate |
| color | Colour to set pixel |
Definition at line 46 of file graphics.c.
Referenced by glcd_draw_char_xy(), glcd_draw_circle(), glcd_draw_line(), glcd_draw_rect(), glcd_draw_rect_thick(), glcd_fill_circle(), glcd_fill_rect(), glcd_scrolling_bar_graph(), and glcd_tiny_draw_char_xy().