EV3RT C API Reference [English]
An RTOS-based development platform for LEGO Mindstorms EV3.
 All Data Structures Functions Variables Enumerations Enumerator Groups
ev3api_lcd.h
1 
17 #pragma once
18 
39 typedef enum {
42 } lcdfont_t;
43 
51 typedef enum {
54 } lcdcolor_t;
55 
56 #define EV3_LCD_WIDTH (178)
57 #define EV3_LCD_HEIGHT (128)
58 
59 
73 
91 ER ev3_font_get_size(lcdfont_t font, int32_t *p_width, int32_t *p_height);
92 
100 typedef struct {
101  int32_t width;
102  int32_t height;
103  void* data;
104 } image_t;
105 
130 ER ev3_image_load(const memfile_t *p_memfile, image_t *p_image);
131 
147 ER ev3_image_free(image_t *p_image);
148 
164 ER ev3_lcd_draw_string(const char *str, int32_t x, int32_t y);
165 
183 ER ev3_lcd_draw_line(int32_t x0, int32_t y0, int32_t x1, int32_t y1);
184 
204 ER ev3_lcd_fill_rect(int32_t x, int32_t y, int32_t w, int32_t h, lcdcolor_t color);
205 
223 ER ev3_lcd_draw_image(const image_t *p_image, int32_t x, int32_t y);
224 
231 #if 0 // Legacy or not implemented
232 
233 ER ev3_image_bitblt(const image_t *src, int32_t sx, int32_t sy, image_t *dst, int32_t dx, int32_t dy, int32_t w, int32_t h, int32_t rop);
234 
235 lcdcolor_t ev3_image_pixel(const image_t *p_image, int32_t x, int32_t y);
236 
237 #endif
White.
Definition: ev3api_lcd.h:52
Font in small size.
Definition: ev3api_lcd.h:40
ER ev3_font_get_size(lcdfont_t font, int32_t *p_width, int32_t *p_height)
Get font size.
Definition: ev3api_lcd.c:29
ER ev3_lcd_draw_string(const char *str, int32_t x, int32_t y)
Draws a character string at the specified position.
Definition: ev3api_lcd.c:41
Font in medium size.
Definition: ev3api_lcd.h:41
ER ev3_lcd_draw_image(const image_t *p_image, int32_t x, int32_t y)
Display the image at specified coordinates.
Definition: ev3api_lcd.c:96
ER ev3_image_free(image_t *p_image)
Release the image object.
Definition: ev3api_lcd.c:82
ER ev3_lcd_set_font(lcdfont_t font)
Set the default font.
Definition: ev3api_lcd.c:17
lcdfont_t
Enumeration type for font size.
Definition: ev3api_lcd.h:39
Black.
Definition: ev3api_lcd.h:53
ER ev3_lcd_draw_line(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
Draw a line at specified coordinates.
Definition: ev3api_lcd.c:114
A memory file is a file stored in RAM rather than on the SD card.
Definition: ev3api_fs.h:31
Structure of the image object.
Definition: ev3api_lcd.h:100
ER ev3_lcd_fill_rect(int32_t x, int32_t y, int32_t w, int32_t h, lcdcolor_t color)
Draw a rectangle.
Definition: ev3api_lcd.c:46
lcdcolor_t
Enumeration type for LCD color.
Definition: ev3api_lcd.h:51
ER ev3_image_load(const memfile_t *p_memfile, image_t *p_image)
Load images from memory file.
Definition: ev3api_lcd.c:51