Definitions of API for LCD.
More...
|
| ER | ev3_lcd_set_font (lcdfont_t font) |
| | Set the default font. More...
|
| |
| ER | ev3_font_get_size (lcdfont_t font, int32_t *p_width, int32_t *p_height) |
| | Get font size. More...
|
| |
| ER | ev3_image_load (const memfile_t *p_memfile, image_t *p_image) |
| | Load images from memory file. More...
|
| |
| ER | ev3_image_free (image_t *p_image) |
| | Release the image object. More...
|
| |
| ER | ev3_lcd_draw_string (const char *str, int32_t x, int32_t y) |
| | Draws a character string at the specified position. More...
|
| |
| ER | ev3_lcd_draw_line (int32_t x0, int32_t y0, int32_t x1, int32_t y1) |
| | Draw a line at specified coordinates. More...
|
| |
| ER | ev3_lcd_fill_rect (int32_t x, int32_t y, int32_t w, int32_t h, lcdcolor_t color) |
| | Draw a rectangle. More...
|
| |
| ER | ev3_lcd_draw_image (const image_t *p_image, int32_t x, int32_t y) |
| | Display the image at specified coordinates. More...
|
| |
Definitions of API for LCD.
Enumeration type for LCD color.
| Enumerator |
|---|
| EV3_LCD_WHITE |
White.
|
| EV3_LCD_BLACK |
Black.
|
Enumeration type for font size.
| Enumerator |
|---|
| EV3_FONT_SMALL |
Font in small size.
|
| EV3_FONT_MEDIUM |
Font in medium size.
|
| ER ev3_font_get_size |
( |
lcdfont_t |
font, |
|
|
int32_t * |
p_width, |
|
|
int32_t * |
p_height |
|
) |
| |
Get font size.
- Parameters
-
| font | Font number |
| p_width | Pointer to a place to store the acquired font width. If it is NULL, it is not stored. |
| p_height | Pointer to the place to store the height of the acquired font. If it is NULL, it is not stored. |
- Return values
-
| E_OK | Successful completion |
| E_ID | Invalid fomt number |
| ER ev3_image_free |
( |
image_t * |
p_image | ) |
|
Release the image object.
Free resources (memory area) secured by the object of the image. In case of normal termination , data of p_image is cleared to NULL.
- Parameters
-
| p_image | Pointer to released object |
- Return values
-
| E_OK | Successful completion |
| E_PAR | p_image is NULL |
Load images from memory file.
Create an image object from the specified memory file. Currently, it only supports monochrome image files in BMP format. If an error occurs , clear the data of p_image to NULL.
- Parameters
-
| p_memfile | Object of memory file where image file is stored |
| p_image | Pointer to the place to store the object of the generated image |
- Return values
-
| E_OK | Successful completion |
| E_NOMEM | Insufficient memory |
| E_NOSPT | Image file format is not supported |
| E_OBJ | Image file is damaged |
| E_PAR | Invalid memory file |
| ER ev3_lcd_draw_image |
( |
const image_t * |
p_image, |
|
|
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| |
Display the image at specified coordinates.
- Parameters
-
| p_image | Image object |
| x | Horizontal position of upper left corner |
| y | Vertical position of upper left corner |
- Return values
-
| E_OK | Successful completion |
| E_PAR | Image object invalid |
| ER ev3_lcd_draw_line |
( |
int32_t |
x0, |
|
|
int32_t |
y0, |
|
|
int32_t |
x1, |
|
|
int32_t |
y1 |
|
) |
| |
Draw a line at specified coordinates.
- Parameters
-
| x0 | Horizontal position of start point |
| y0 | Vertical position of start point |
| x1 | Horizontal position of the end point |
| y1 | Vertical position of the end point |
- Return values
-
| E_OK | Successful completion |
| ER ev3_lcd_draw_string |
( |
const char * |
str, |
|
|
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| |
Draws a character string at the specified position.
- Parameters
-
| x | Horizontal position of upper left corner |
| y | Vertical position of upper left corner |
| str | String (pointer to array of characters) |
- Return values
-
| E_OK | Successful completion |
| ER ev3_lcd_fill_rect |
( |
int32_t |
x, |
|
|
int32_t |
y, |
|
|
int32_t |
w, |
|
|
int32_t |
h, |
|
|
lcdcolor_t |
color |
|
) |
| |
Draw a rectangle.
- Parameters
-
| x | Horizontal position of upper left corner |
| y | Vertical position of upper left corner |
| w | Width of the rectangle |
| h | Height of the rectangle |
| color | Color [TODO: color of filling?] |
- Return values
-
| E_OK | Successful completion |
Set the default font.
- Parameters
-
- Return values
-
| E_OK | Successful completion |
| E_ID | Invalid font number |