|
EasyGUI
|
LCD Drawing operations. More...
Modules | |
| Colors | |
| List of default GUI colors for fast development. | |
Data Structures | |
| struct | gui_draw_text_t |
| Structure for drawing strings on widgets. More... | |
| struct | gui_draw_rect_ex_t |
| Extended rectangle structure. More... | |
| struct | gui_draw_sb_t |
| Scroll bar structure. More... | |
| struct | gui_draw_poly_t |
| Poly line object coordinates. More... | |
Macros | |
| #define | GUI_DRAW_CIRCLE_TL 0x01 |
| #define | GUI_DRAW_CIRCLE_TR 0x02 |
| #define | GUI_DRAW_CIRCLE_BR 0x04 |
| #define | GUI_DRAW_CIRCLE_BL 0x08 |
| #define | GUI_FLAG_DRAW_GRAD_VER 0x01 |
| #define | GUI_FLAG_DRAW_GRAD_HOR 0x02 |
| #define | GUI_FLAG_DRAW_FILLED 0x04 |
Enumerations | |
| enum | gui_draw_sb_dir_t { GUI_DRAW_SB_DIR_VERTICAL = 0x00, GUI_DRAW_SB_DIR_HORIZONTAL = 0x00 } |
| Scroll bar direction enumeration. More... | |
| enum | gui_draw_3d_state_t { GUI_DRAW_3D_State_Raised = 0x00, GUI_DRAW_3D_State_Lowered = 0x01 } |
| 3D states enumeration More... | |
Functions | |
| void | gui_draw_text_init (gui_draw_text_t *f) |
| Initialize gui_draw_text_t structure for further usage. More... | |
| void | gui_draw_fillscreen (const gui_display_t *disp, gui_color_t color) |
| Fill screen with color. More... | |
| void | gui_draw_setpixel (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_color_t color) |
| Set single pixel at X and Y location. More... | |
| gui_color_t | gui_draw_getpixel (const gui_display_t *disp, gui_dim_t x, gui_dim_t y) |
| Get pixel color at X and Y location. More... | |
| void | gui_draw_vline (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t length, gui_color_t color) |
| Draw vertical line to LCD. More... | |
| void | gui_draw_hline (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t length, gui_color_t color) |
| Draw horizontal line to LCD. More... | |
| void | gui_draw_line (const gui_display_t *disp, gui_dim_t x1, gui_dim_t y1, gui_dim_t x2, gui_dim_t y2, gui_color_t color) |
| Draw line from point 1 to point 2. More... | |
| void | gui_draw_rectangle (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t width, gui_dim_t height, gui_color_t color) |
| Draw rectangle. More... | |
| void | gui_draw_rectangle_ex (const gui_display_t *disp, gui_draw_rect_ex_t *rect) |
| Draw rectangle extended function. More... | |
| void | gui_draw_filledrectangle (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t width, gui_dim_t height, gui_color_t color) |
| Draw filled rectangle. More... | |
| void | gui_draw_roundedrectangle (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t width, gui_dim_t height, gui_dim_t r, gui_color_t color) |
| Draw rectangle with rounded corners. More... | |
| void | gui_draw_filledroundedrectangle (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t width, gui_dim_t height, gui_dim_t r, gui_color_t color) |
| Draw filled rectangle with rounded corners. More... | |
| void | gui_draw_circle (const gui_display_t *disp, gui_dim_t x0, gui_dim_t y0, gui_dim_t r, gui_color_t color) |
| Draw circle. More... | |
| void | gui_draw_filledcircle (const gui_display_t *disp, gui_dim_t x0, gui_dim_t y0, gui_dim_t r, gui_color_t color) |
| Draw filled circle. More... | |
| void | gui_draw_circlecorner (const gui_display_t *disp, gui_dim_t x0, gui_dim_t y0, gui_dim_t r, uint8_t c, gui_color_t color) |
| Draw circle corner, selected with parameter. More... | |
| void | gui_draw_filledcirclecorner (const gui_display_t *disp, gui_dim_t x0, gui_dim_t y0, gui_dim_t r, uint8_t c, uint32_t color) |
| Draw filled circle corner, selected with parameter. More... | |
| void | gui_draw_triangle (const gui_display_t *disp, gui_dim_t x1, gui_dim_t y1, gui_dim_t x2, gui_dim_t y2, gui_dim_t x3, gui_dim_t y3, gui_color_t color) |
| Draw triangle. More... | |
| void | gui_draw_filledtriangle (const gui_display_t *disp, gui_dim_t x1, gui_dim_t y1, gui_dim_t x2, gui_dim_t y2, gui_dim_t x3, gui_dim_t y3, gui_color_t color) |
| Draw filled triangle. More... | |
| void | gui_draw_image (gui_display_t *disp, gui_dim_t x, gui_dim_t y, const gui_image_desc_t *img) |
| Draw image to display of any depth and size. More... | |
| void | gui_draw_writetext (const gui_display_t *disp, const gui_font_t *font, const gui_char *str, gui_draw_text_t *draw) |
| Write text to screen. More... | |
| void | gui_draw_rectangle3d (const gui_display_t *disp, gui_dim_t x, gui_dim_t y, gui_dim_t width, gui_dim_t height, gui_draw_3d_state_t state) |
| Draw rectangle with 3D view. More... | |
| void | gui_draw_poly (const gui_display_t *disp, const gui_draw_poly_t *points, size_t len, gui_color_t color) |
| Draw polygon lines. More... | |
| void | gui_draw_scrollbar_init (gui_draw_sb_t *sb) |
| Initializes gui_draw_sb_t structure for drawing operations. More... | |
| void | gui_draw_scrollbar (const gui_display_t *disp, gui_draw_sb_t *sb) |
| Draw scroll bar to screen. More... | |
LCD Drawing operations.
| #define GUI_DRAW_CIRCLE_BL 0x08 |
Draw bottom right part of circle
| #define GUI_DRAW_CIRCLE_BR 0x04 |
Draw bottom left part of circle
| #define GUI_DRAW_CIRCLE_TL 0x01 |
Draw top left part of circle
| #define GUI_DRAW_CIRCLE_TR 0x02 |
Draw top right part of circle
| enum gui_draw_3d_state_t |
3D states enumeration
| Enumerator | |
|---|---|
| GUI_DRAW_3D_State_Raised | Raised 3D style |
| GUI_DRAW_3D_State_Lowered | Lowered 3D style |
| enum gui_draw_sb_dir_t |
| void gui_draw_circle | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | r, | ||
| gui_color_t | color | ||
| ) |
Draw circle.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | X position of circle center |
| [in] | y | X position of circle center |
| [in] | r | Circle radius |
| [in] | color | Color used for drawing operation |
| void gui_draw_circlecorner | ( | const gui_display_t * | disp, |
| gui_dim_t | x0, | ||
| gui_dim_t | y0, | ||
| gui_dim_t | r, | ||
| uint8_t | c, | ||
| gui_color_t | color | ||
| ) |
Draw circle corner, selected with parameter.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x0 | X position of corner origin |
| [in] | y0 | Y position of corner origin |
| [in] | r | Circle radius |
| [in] | c | List of corners to draw. Use BITWISE OR with these values to specify corner: |
| [in] | color | Color used for drawing operation |
| void gui_draw_filledcircle | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | r, | ||
| gui_color_t | color | ||
| ) |
Draw filled circle.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | X position of circle center |
| [in] | y | X position of circle center |
| [in] | r | Circle radius |
| [in] | color | Color used for drawing operation |
| void gui_draw_filledcirclecorner | ( | const gui_display_t * | disp, |
| gui_dim_t | x0, | ||
| gui_dim_t | y0, | ||
| gui_dim_t | r, | ||
| uint8_t | c, | ||
| gui_color_t | color | ||
| ) |
Draw filled circle corner, selected with parameter.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x0 | X position of corner origin |
| [in] | y0 | Y position of corner origin |
| [in] | r | Circle radius |
| [in] | c | List of corners to draw. Use BITWISE OR with these values to specify corner: |
| [in] | color | Color used for drawing operation |
| void gui_draw_filledrectangle | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | width, | ||
| gui_dim_t | height, | ||
| gui_color_t | color | ||
| ) |
Draw filled rectangle.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Top left X position |
| [in] | y | Top left Y position |
| [in] | width | Rectangle width |
| [in] | height | Rectangle height |
| [in] | color | Color used for drawing operation |
| void gui_draw_filledroundedrectangle | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | width, | ||
| gui_dim_t | height, | ||
| gui_dim_t | r, | ||
| gui_color_t | color | ||
| ) |
Draw filled rectangle with rounded corners.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Top left X position |
| [in] | y | Top left Y position |
| [in] | width | Rectangle width |
| [in] | height | Rectangle height |
| [in] | r | Corner radius, max value can be r = MIN(width, height) / 2 |
| [in] | color | Color used for drawing operation |
| void gui_draw_filledtriangle | ( | const gui_display_t * | disp, |
| gui_dim_t | x1, | ||
| gui_dim_t | y1, | ||
| gui_dim_t | x2, | ||
| gui_dim_t | y2, | ||
| gui_dim_t | x3, | ||
| gui_dim_t | y3, | ||
| gui_color_t | color | ||
| ) |
Draw filled triangle.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x1 | Triangle point 1 X position |
| [in] | y1 | Triangle point 1 Y position |
| [in] | x2 | Triangle point 2 X position |
| [in] | y2 | Triangle point 2 Y position |
| [in] | x3 | Triangle point 3 X position |
| [in] | y3 | Triangle point 3 Y position |
| [in] | color | Color used for drawing operation |
| void gui_draw_fillscreen | ( | const gui_display_t * | disp, |
| gui_color_t | color | ||
| ) |
Fill screen with color.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | color | Color to use for filling screen |
| gui_color_t gui_draw_getpixel | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y | ||
| ) |
Get pixel color at X and Y location.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | X position on LCD |
| [in] | y | Y position on LCD |
| void gui_draw_hline | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | length, | ||
| gui_color_t | color | ||
| ) |
Draw horizontal line to LCD.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Line left X position |
| [in] | y | Line left Y position |
| [in] | length | Length of horizontal line |
| [in] | color | Color used for drawing operation |
| void gui_draw_image | ( | gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| const gui_image_desc_t * | img | ||
| ) |
Draw image to display of any depth and size.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Top left X position |
| [in] | y | Top left Y position |
| [in] | img | Pointer to gui_image_desc_t structure with image description |
| void gui_draw_line | ( | const gui_display_t * | disp, |
| gui_dim_t | x1, | ||
| gui_dim_t | y1, | ||
| gui_dim_t | x2, | ||
| gui_dim_t | y2, | ||
| gui_color_t | color | ||
| ) |
Draw line from point 1 to point 2.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x1 | Line start X position |
| [in] | y1 | Line start Y position |
| [in] | x2 | Line end X position |
| [in] | y2 | Line end Y position |
| [in] | color | Color used for drawing operation |
| void gui_draw_poly | ( | const gui_display_t * | disp, |
| const gui_draw_poly_t * | points, | ||
| size_t | len, | ||
| gui_color_t | color | ||
| ) |
Draw polygon lines.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | points | Pointer to array of gui_draw_poly_t points to draw lines between |
| [in] | len | Number of points in array. There must be at least 2 points |
| [in] | color | Color to use for drawing |
| void gui_draw_rectangle | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | width, | ||
| gui_dim_t | height, | ||
| gui_color_t | color | ||
| ) |
Draw rectangle.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Top left X position |
| [in] | y | Top left Y position |
| [in] | width | Rectangle width |
| [in] | height | Rectangle height |
| [in] | color | Color used for drawing operation |
| void gui_draw_rectangle3d | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | width, | ||
| gui_dim_t | height, | ||
| gui_draw_3d_state_t | state | ||
| ) |
Draw rectangle with 3D view.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Top left X position |
| [in] | y | Top left Y position |
| [in] | width | Rectangle width |
| [in] | height | Rectangle height |
| [in] | state | 3D state. This parameter can be a value of gui_draw_3d_state_t enumeration |
| void gui_draw_rectangle_ex | ( | const gui_display_t * | disp, |
| gui_draw_rect_ex_t * | rect | ||
| ) |
Draw rectangle extended function.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | rect | Rectangle data |
| void gui_draw_roundedrectangle | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | width, | ||
| gui_dim_t | height, | ||
| gui_dim_t | r, | ||
| gui_color_t | color | ||
| ) |
Draw rectangle with rounded corners.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Top left X position |
| [in] | y | Top left Y position |
| [in] | width | Rectangle width |
| [in] | height | Rectangle height |
| [in] | r | Corner radius, max value can be r = MIN(width, height) / 2 |
| [in] | color | Color used for drawing operation |
| void gui_draw_scrollbar | ( | const gui_display_t * | disp, |
| gui_draw_sb_t * | sb | ||
| ) |
Draw scroll bar to screen.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | sb | Pointer to gui_draw_sb_t parameters for scroll bar |
| void gui_draw_scrollbar_init | ( | gui_draw_sb_t * | sb | ) |
Initializes gui_draw_sb_t structure for drawing operations.
| [in] | sb | Pointer to gui_draw_sb_t to initialize to default values |
| void gui_draw_setpixel | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_color_t | color | ||
| ) |
Set single pixel at X and Y location.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | X position on LCD |
| [in] | y | Y position on LCD |
| [in] | color | Color used for drawing operation |
| void gui_draw_text_init | ( | gui_draw_text_t * | f | ) |
Initialize gui_draw_text_t structure for further usage.
| [in,out] | f | Pointer to empty gui_draw_text_t structure |
| void gui_draw_triangle | ( | const gui_display_t * | disp, |
| gui_dim_t | x1, | ||
| gui_dim_t | y1, | ||
| gui_dim_t | x2, | ||
| gui_dim_t | y2, | ||
| gui_dim_t | x3, | ||
| gui_dim_t | y3, | ||
| gui_color_t | color | ||
| ) |
Draw triangle.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x1 | Triangle point 1 X position |
| [in] | y1 | Triangle point 1 Y position |
| [in] | x2 | Triangle point 2 X position |
| [in] | y2 | Triangle point 2 Y position |
| [in] | x3 | Triangle point 3 X position |
| [in] | y3 | Triangle point 3 Y position |
| [in] | color | Color used for drawing operation |
| void gui_draw_vline | ( | const gui_display_t * | disp, |
| gui_dim_t | x, | ||
| gui_dim_t | y, | ||
| gui_dim_t | length, | ||
| gui_color_t | color | ||
| ) |
Draw vertical line to LCD.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | x | Line top X position |
| [in] | y | Line top Y position |
| [in] | length | Length of vertical line |
| [in] | color | Color used for drawing operation |
| void gui_draw_writetext | ( | const gui_display_t * | disp, |
| const gui_font_t * | font, | ||
| const gui_char * | str, | ||
| gui_draw_text_t * | draw | ||
| ) |
Write text to screen.
| [in,out] | disp | Pointer to gui_display_t structure for display operations |
| [in] | font | Pointer to gui_font_t structure with font to use |
| [in] | str | Pointer to string to draw on screen |
| [in] | draw | Pointer to gui_draw_text_t structure with specifications about drawing style |