forked from len0rd/rockbox
lcd: Move parameter handling calls to lcd-bitmap-common.c
No need to reimplement the same drawmode, getwidth, etc, calls for each pixel format. Change-Id: Ibbe32814f72e1492c190ba578cec303c1cf29b12
This commit is contained in:
parent
eaccdeeae2
commit
f8e968991d
6 changed files with 46 additions and 204 deletions
|
|
@ -136,16 +136,6 @@ unsigned lcd_remote_color_to_native(unsigned color)
|
|||
}
|
||||
#endif
|
||||
|
||||
void LCDFN(set_drawmode)(int mode)
|
||||
{
|
||||
CURRENT_VP->drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
}
|
||||
|
||||
int LCDFN(get_drawmode)(void)
|
||||
{
|
||||
return CURRENT_VP->drawmode;
|
||||
}
|
||||
|
||||
void LCDFN(set_foreground)(unsigned brightness)
|
||||
{
|
||||
CURRENT_VP->fg_pattern = brightness;
|
||||
|
|
@ -168,38 +158,6 @@ unsigned LCDFN(get_background)(void)
|
|||
return CURRENT_VP->bg_pattern;
|
||||
}
|
||||
|
||||
void LCDFN(set_drawinfo)(int mode, unsigned fg_brightness,
|
||||
unsigned bg_brightness)
|
||||
{
|
||||
LCDFN(set_drawmode)(mode);
|
||||
LCDFN(set_foreground)(fg_brightness);
|
||||
LCDFN(set_background)(bg_brightness);
|
||||
}
|
||||
|
||||
int LCDFN(getwidth)(void)
|
||||
{
|
||||
return CURRENT_VP->width;
|
||||
}
|
||||
|
||||
int LCDFN(getheight)(void)
|
||||
{
|
||||
return CURRENT_VP->height;
|
||||
}
|
||||
void LCDFN(setfont)(int newfont)
|
||||
{
|
||||
CURRENT_VP->font = newfont;
|
||||
}
|
||||
|
||||
int LCDFN(getfont)(void)
|
||||
{
|
||||
return CURRENT_VP->font;
|
||||
}
|
||||
|
||||
int LCDFN(getstringsize)(const unsigned char *str, int *w, int *h)
|
||||
{
|
||||
return font_getstringsize(str, w, h, CURRENT_VP->font);
|
||||
}
|
||||
|
||||
/*** low-level drawing functions ***/
|
||||
|
||||
static void setpixel(int x, int y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue