#include <otGraphics.h>
Public Types | |
typedef otGraphics::rotation_t | rotation_t |
typedef otGraphics::controller_t | controller_t |
typedef otGraphics::tab_t | tab_t |
enum | rotation_t { IR_0, IR_90, IR_180, IR_270, IR_BMP_0, IR_BMP_90, IR_BMP_180, IR_BMP_270 } |
enum | controller_t { ILI9341, ILI9486, ILI9488, ST7735 } |
enum | tab_t { GREEN_TAB, RED_TAB, BLACK_TAB, NONE_TAB } |
Public Member Functions | |
otGraphics () | |
void | init (controller_t crt=ILI9341, U8 spiClk=20, tab_t tab=NONE_TAB) |
void | backlight (bool ena) |
void | invert (bool ena) |
void | clear (U16 col=RGB565_BLACK) |
void | setRotation (rotation_t r) |
void | setWindow (U16 x0, U16 y0, U16 x1, U16 y1) |
void | pushColor (U16 color) |
void | pushColor (U16 color, U32 n) |
void | pushColor (U16 *data, U32 len) |
void | setPixel (U16 x, U16 y, U16 color) |
void | fillRect (U16 x, U16 y, U16 w, U16 h, U16 color) |
void | drawLine (U16 x0, U16 y0, U16 x1, U16 y1, U16 color) |
void | drawCircle (U16 x0, U16 y0, U16 r, U16 color) |
void | fillCircle (U16 x0, U16 y0, U16 r, U16 color) |
void | drawRect (U16 x, U16 y, U16 w, U16 h, U16 color) |
void | drawRoundRect (U16 x, U16 y, U16 w, U16 h, U16 r, U16 color) |
void | fillRoundRect (U16 x, U16 y, U16 w, U16 h, U16 r, U16 color) |
void | drawTriangle (U16 x0, U16 y0, U16 x1, U16 y1, U16 x2, U16 y2, U16 color) |
void | fillTriangle (U16 x0, U16 y0, U16 x1, U16 y1, U16 x2, U16 y2, U16 color) |
void | drawBitmap (U16 x, U16 y, const U8 *bitmap, U16 w, U16 h, U16 color) |
void | drawBitmapBackground (U16 x, U16 y, const U8 *bitmap, U16 w, U16 h, U16 color, U16 bg) |
void | drawXBitmap (U16 x, U16 y, const U8 *bitmap, U16 w, U16 h, U16 color) |
void | drawGrayscaleBitmap (U16 x, U16 y, const U8 *bitmap, U16 w, U16 h) |
void | drawGrayscaleBitmapMask (U16 x, U16 y, const U8 *bitmap, const U8 *mask, U16 w, U16 h) |
void | draw565Bitmap (U16 x, U16 y, const U16 *bitmap, U16 w, U16 h, U16 mask=0xFFFF) |
void | drawRGB (U16 x, U16 y, const U8 *bitmap, U16 w, U16 h) |
void | drawRgbBitmapMask (U16 x, U16 y, const U16 *bitmap, const U8 *mask, U16 w, U16 h) |
void | drawChar (U16 x, U16 y, U8 c, U16 color, U16 bg, U8 size) |
U32 | write (U8 c) |
U32 | writeString (const char *str, U16 color=DEFAULT_COLOR) |
U32 | writeString (const char *str, S32 len) |
U32 | writeString (U16 y, const char *str, U16 color=DEFAULT_COLOR) |
void | setCursor (U16 x, U16 y) |
void | cursor (U16 &x, U16 &y) |
void | setTextSize (U8 s) |
U8 | textSize () |
void | setTextColor (U16 c) |
void | setTextColor (U16 c, U16 b) |
void | setTextWrap (bool w) |
U8 | rotation () |
void | setCp437 (bool x) |
void | setFont (const GFXfont *f) |
void | size (U16 &w, U16 &h) |
void | charBounds (char c, U16 &x, U16 &y, U16 &minx, U16 &miny, U16 &maxx, U16 &maxy) |
void | textBounds (const char *str, U16 x, U16 y, U16 &x1, U16 &y1, U16 &w, U16 &h) |
void | drawEllipse (U16 x0, U16 y0, U16 rx, U16 ry, U16 color) |
void | fillEllipse (U16 x0, U16 y0, U16 rx, U16 ry, U16 color) |
U16 | to565 (U8 r, U8 g, U8 b) |
void | setScroll (U16 offset) |
void | showImagePal (U16 x, U16 y, U16 w, U16 h, const U8 *pixels, const U16 *palette) |
void | showImagePalZx2 (U16 x, U16 y, U16 w, U16 h, const U8 *pixels, const U16 *palette) |
void | showImagePalZx4 (U16 x, U16 y, U16 w, U16 h, const U8 *pixels, const U16 *palette) |
void | showImagePal4bit (U16 x, U16 y, U16 w, U16 h, const U8 *pixels, const U16 *palette) |
void | showImagePal2bit (U16 x, U16 y, U16 w, U16 h, const U8 *pixels, const U16 *palette) |
void | showImagePal1bit (U16 x, U16 y, U16 w, U16 h, const U8 *pixels, const U16 *palette) |
void | fillRectHGradient (S16 x, S16 y, U16 w, U16 h, U16 color1, U16 color2) |
void | fillRectVGradient (S16 x, S16 y, U16 w, U16 h, U16 color1, U16 color2) |
|
|
|
|
|
|
|
|
|
|
|
|
Create the object. |
|
Turn on/off LCD backlight
|
|
Return the size of a character in pixels to the minimum and maximum values.
|
|
Clear LCD with specified color
|
|
Return the cursor coordinates
|
|
Draw an RGB image bitmap with 565 encode
|
|
Draw a resident 1-bit image at the specified (x,y) position, using the specified foreground color (unset bits are transparent).
|
|
Draw a resident 1-bit image at the specified (x,y) position, using the specified foreground (for set bits) and background (unset bits) colors.
|
|
Draw a character
|
|
Draw a circle.
|
|
Draw an ellipse
|
|
Draw a RAM-resident 8-bit image (grayscale) at the specified (x,y) pos. Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed.
|
|
Draw a resident 8-bit image (grayscale) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) pos. BOTH buffers (grayscale and mask) must be resident, no mix-and- match. Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed.
|
|
Draw a line.
|
|
Draw a rectangle
|
|
Draw an RGB image bitmap with 24bit encode
|
|
Draw an RGB image bitmap with 24bit encode with mask
|
|
Draw a rectangle with rounded angles
|
|
Draw a triangle.
|
|
Draw resident XBitMap Files (*.xbm), exported from GIMP, Usage: Export from GIMP to *.xbm, rename *.xbm to *.c and open in editor. C Array can be directly used with this function.
|
|
Draw a filled circle.
|
|
Draw an filled ellipse
|
|
Draw a filled rectangle
|
|
Create an horizontal color gradient area
|
|
Create a vertical color gradient area
|
|
Draw a filled rectangle with rounded angles
|
|
Draw a filled triangle.
|
|
Init the hardware
|
|
Invert LCD display.
|
|
Write a specified color on display
|
|
Write a specified color n time on display
|
|
Write a specified color on display
|
|
Return used display rotation
|
|
Enable (or disable) Code Page 437-compatible charset. There was an error in glcdfont.c for the longest time -- one character (#176, the 'light shade' block) was missing -- this threw off the index of every character that followed it. But a TON of code has been written with the erroneous character indices. By default, the library uses the original 'wrong' behavior and old sketches will still work. Pass 'true' to this function to use correct CP437 character values in your code.
|
|
Specify the cursor coordinates
|
|
Set a specified font
|
|
Write a color pixel on display
|
|
Change display orientation
|
|
Scroll the display for a specified value
|
|
Specify the foreground and background text color
|
|
Specify the foreground text color
|
|
Specify the text size
|
|
Enable or disable text wrap
|
|
Specifiy a window where allow graphics operations.
|
|
Show an 8bit image trough a specified palette
|
|
Show an 1bit image trough a specified palette
|
|
Show an 2bit image trough a specified palette
|
|
Show an 4bit image trough a specified palette
|
|
Show an 8bit image trough a specified palette with a zoom of 2x
|
|
Show an 8bit image trough a specified palette with a zoom of 4x
|
|
Return the display size
|
|
Return the size of a string in pixels to the minimum and maximum values.
|
|
Return current text size
|
|
Pass 8-bit (each) R,G,B, get back 16-bit packed color
|
|
Write a character using cursor coordinates
|
|
Write a centered string
|
|
Write a string using cursor coordinates
|
|
Write a string using cursor coordinates
|