![]() |
Display Simple Graphics library
v0.5
Library containing shape, text, and bitmap drawing functions called by various display drivers
|
#include "simplegfx.h"
Functions | |
void | setCursor (screen_t *dev, int x, int y, char size) |
Sets the cursor position based on the size parameter. More... | |
void | setTextSize (screen_t *dev, char s) |
Sets the size of the font to be used. Range is from 1 to 3. Size (1) is 5x7 (6x8 spacing) pixels, size (2) is 11x15 (12x16 spacing) pixels and size (3) is 15x23 (16x24 spacing) pixels. More... | |
void | setTextColor (screen_t *dev, int c) |
Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent. More... | |
void | setBgColor (screen_t *dev, int c) |
Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent. More... | |
void | setTextWrap (screen_t *dev, char w) |
Toggles automatic wrapping of text printed to the screen. More... | |
void setBgColor | ( | screen_t * | dev, |
int | color | ||
) |
Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent.
dev | Pointer to the display's device structure returned by the initialization function. |
color | Color of the font, in the format native to the display. |
void setCursor | ( | screen_t * | dev, |
int | x, | ||
int | y, | ||
char | size | ||
) |
Sets the cursor position based on the size parameter.
dev | Pointer to the display's device structure returned by the initialization function. |
x | Horizontal position of the cursor, counted from the left side of the screen. |
y | Vertical position of the cursor, counted down from the top of the screen. |
size | The size of the cursor. Correlated to font size: (0) moves the cursor in 1 pixel increments, (1) moves the cursor in font size 1 character increments, (2) moves the cursor in font size 2 increments and (3) moves the cursor in font size 3 increments |
void setTextColor | ( | screen_t * | dev, |
int | color | ||
) |
Sets the color of the font and the color of the background (highlighting) to be used. Setting the text color and text background to the same color will make the background color transparent.
dev | Pointer to the display's device structure returned by the initialization function. |
color | Color of the font, in the format native to the display. |
void setTextSize | ( | screen_t * | dev, |
char | s | ||
) |
Sets the size of the font to be used. Range is from 1 to 3. Size (1) is 5x7 (6x8 spacing) pixels, size (2) is 11x15 (12x16 spacing) pixels and size (3) is 15x23 (16x24 spacing) pixels.
dev | Pointer to the display's device structure returned by the initialization function. |
s | Size of text to draw. 1 = small (5x7) font, 2 = medium (11x15) font, 3 = large (17x23) font. |
void setTextWrap | ( | screen_t * | dev, |
char | w | ||
) |
Toggles automatic wrapping of text printed to the screen.
dev | Pointer to the display's device structure returned by the initialization function. |
w | Wrapping (0) off -OR- (1) on. |