diff options
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
-rw-r--r-- | firmware/drivers/lcd-bitmap-common.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index cc42248b2d..6a3fd5f825 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c | |||
@@ -164,6 +164,52 @@ static bool LCDFN(clip_viewport_rect)(int *x, int *y, int *width, int *height, | |||
164 | return *width > 0 && *height > 0; | 164 | return *width > 0 && *height > 0; |
165 | } | 165 | } |
166 | 166 | ||
167 | /*** parameter handling ***/ | ||
168 | |||
169 | void LCDFN(set_drawmode)(int mode) | ||
170 | { | ||
171 | LCDFN(current_viewport)->drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID); | ||
172 | } | ||
173 | |||
174 | int LCDFN(get_drawmode)(void) | ||
175 | { | ||
176 | return LCDFN(current_viewport)->drawmode; | ||
177 | } | ||
178 | |||
179 | int LCDFN(getwidth)(void) | ||
180 | { | ||
181 | return LCDFN(current_viewport)->width; | ||
182 | } | ||
183 | |||
184 | int LCDFN(getheight)(void) | ||
185 | { | ||
186 | return LCDFN(current_viewport)->height; | ||
187 | } | ||
188 | |||
189 | void LCDFN(setfont)(int newfont) | ||
190 | { | ||
191 | LCDFN(current_viewport)->font = newfont; | ||
192 | } | ||
193 | |||
194 | int LCDFN(getfont)(void) | ||
195 | { | ||
196 | return LCDFN(current_viewport)->font; | ||
197 | } | ||
198 | |||
199 | int LCDFN(getstringsize)(const unsigned char *str, int *w, int *h) | ||
200 | { | ||
201 | return font_getstringsize(str, w, h, LCDFN(current_viewport)->font); | ||
202 | } | ||
203 | |||
204 | #if LCDM(DEPTH) > 1 | ||
205 | void LCDFN(set_drawinfo)(int mode, unsigned foreground, unsigned background) | ||
206 | { | ||
207 | LCDFN(set_drawmode)(mode); | ||
208 | LCDFN(set_foreground)(foreground); | ||
209 | LCDFN(set_background)(background); | ||
210 | } | ||
211 | #endif | ||
212 | |||
167 | /* | 213 | /* |
168 | * draws the borders of the current viewport | 214 | * draws the borders of the current viewport |
169 | **/ | 215 | **/ |