GFX helper class.
More...
This file is used by the screen.
|
synchronized void | delete () |
|
void | setAddrWindow (short x0, short y0, short x1, short y1) |
|
void | drawPixel (short x, short y, int color) |
|
void | refresh () |
|
void | drawChar (short x, short y, short data, int color, int bg, short size) |
|
void | print (String msg) |
|
int | setPixel (int x, int y, int color) |
|
void | fillScreen (int color) |
|
void | fillRect (short x, short y, short w, short h, int color) |
|
void | drawFastVLine (short x, short y, short h, int color) |
|
void | drawLine (short x0, short y0, short x1, short y1, int color) |
|
void | drawTriangle (short x0, short y0, short x1, short y1, short x2, short y2, int color) |
|
void | drawCircle (short x, short y, short r, int color) |
|
void | setCursor (short x, short y) |
|
void | setTextColor (int textColor, int textBGColor) |
|
void | setTextSize (short size) |
|
void | setTextWrap (short wrap) |
|
void | setM_height (int value) |
|
int | getM_height () |
|
void | setM_width (int value) |
|
int | getM_width () |
|
void | setM_textSize (int value) |
|
int | getM_textSize () |
|
void | setM_textColor (int value) |
|
int | getM_textColor () |
|
void | setM_textBGColor (int value) |
|
int | getM_textBGColor () |
|
void | setM_cursorX (int value) |
|
int | getM_cursorX () |
|
void | setM_cursorY (int value) |
|
int | getM_cursorY () |
|
void | setM_wrap (int value) |
|
int | getM_wrap () |
|
void drawChar |
( |
short |
x, |
|
|
short |
y, |
|
|
short |
data, |
|
|
int |
color, |
|
|
int |
bg, |
|
|
short |
size |
|
) |
| |
- Parameters
-
x | Axis on the horizontal scale |
y | Axis on the vertical scale |
data | Character to write |
color | Character color |
bg | Character background color |
size | Size of the font |
void drawCircle |
( |
short |
x, |
|
|
short |
y, |
|
|
short |
r, |
|
|
int |
color |
|
) |
| |
Draws a circle
- Parameters
-
x | Center of the circle on the horizontal scale |
y | Center of the circle on the vertical scale |
r | Radius of the circle |
color | Color of the circle |
void drawFastVLine |
( |
short |
x, |
|
|
short |
y, |
|
|
short |
h, |
|
|
int |
color |
|
) |
| |
Draws a line on the vertical scale
- Parameters
-
x | Axis on the horizontal scale |
y | Axis on the vertical scale |
h | Distanse from y |
color | Selected color |
void drawLine |
( |
short |
x0, |
|
|
short |
y0, |
|
|
short |
x1, |
|
|
short |
y1, |
|
|
int |
color |
|
) |
| |
Draws a line from coordinate C0 to coordinate C1
- Parameters
-
x0 | First coordinate |
y0 | First coordinate |
x1 | Second coordinate |
y1 | Second coordinate |
color | selected color |
void drawPixel |
( |
short |
x, |
|
|
short |
y, |
|
|
int |
color |
|
) |
| |
Sends a pixel color (RGB) to the chip. Must be implemented by the inherited class.
- Parameters
-
x | Axis on the horizontal scale |
y | Axis on the vertical scale |
color | RGB value |
void drawTriangle |
( |
short |
x0, |
|
|
short |
y0, |
|
|
short |
x1, |
|
|
short |
y1, |
|
|
short |
x2, |
|
|
short |
y2, |
|
|
int |
color |
|
) |
| |
Draws a triangle
- Parameters
-
x0 | First coordinate |
y0 | First coordinate |
x1 | Second coordinate |
y1 | Second coordinate |
x2 | Third coordinate |
y2 | Third coordinate |
color | Selected color |
void fillRect |
( |
short |
x, |
|
|
short |
y, |
|
|
short |
w, |
|
|
short |
h, |
|
|
int |
color |
|
) |
| |
Fills a rectangle with a selected color
- Parameters
-
x | Axis on the horizontal scale (top-left corner) |
y | Axis on the vertical scale (top-left corner) |
w | Distanse from x |
h | Distanse from y |
color | Selected color |
void fillScreen |
( |
int |
color | ) |
|
Fills the screen with a selected color
- Parameters
-
Prints a message on the screen
- Parameters
-
Copies the buffer to the chip via the SPI.
void setAddrWindow |
( |
short |
x0, |
|
|
short |
y0, |
|
|
short |
x1, |
|
|
short |
y1 |
|
) |
| |
Sets the window address
- Parameters
-
x0 | First coordinate |
y0 | First coordinate |
x1 | Second coordinate |
y1 | Second coordinate |
void setCursor |
( |
short |
x, |
|
|
short |
y |
|
) |
| |
Sets the cursor for a text message
- Parameters
-
x | Axis on the horizontal scale |
y | Axis on the vertical scale |
int setPixel |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
color |
|
) |
| |
Prints a message on the screen
- Parameters
-
x | Axis on the horizontal scale |
y | Axis on the vertical scale |
color | Pixel color |
void setTextColor |
( |
int |
textColor, |
|
|
int |
textBGColor |
|
) |
| |
Sets a text color for a message
- Parameters
-
textColor | Font color |
textBGColor | Background color |
void setTextSize |
( |
short |
size | ) |
|
Sets the size of the font
- Parameters
-
void setTextWrap |
( |
short |
wrap | ) |
|
Wraps a printed message
- Parameters
-
wrap | True (0x1) or false (0x0) |
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/upm-doc-stable/build-33/src/st7735/GFX.java