mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
|
@ -111,16 +111,6 @@ void lcd_clear_display(void)
|
|||
|
||||
/*** parameter handling ***/
|
||||
|
||||
void lcd_set_drawmode(int mode)
|
||||
{
|
||||
lcd_current_viewport->drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
}
|
||||
|
||||
int lcd_get_drawmode(void)
|
||||
{
|
||||
return lcd_current_viewport->drawmode;
|
||||
}
|
||||
|
||||
void lcd_set_foreground(unsigned color)
|
||||
{
|
||||
lcd_current_viewport->fg_pattern = color;
|
||||
|
@ -141,37 +131,6 @@ unsigned lcd_get_background(void)
|
|||
return lcd_current_viewport->bg_pattern;
|
||||
}
|
||||
|
||||
void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
|
||||
{
|
||||
lcd_set_drawmode(mode);
|
||||
lcd_current_viewport->fg_pattern = fg_color;
|
||||
lcd_current_viewport->bg_pattern = bg_color;
|
||||
}
|
||||
|
||||
int lcd_getwidth(void)
|
||||
{
|
||||
return lcd_current_viewport->width;
|
||||
}
|
||||
|
||||
int lcd_getheight(void)
|
||||
{
|
||||
return lcd_current_viewport->height;
|
||||
}
|
||||
|
||||
void lcd_setfont(int newfont)
|
||||
{
|
||||
lcd_current_viewport->font = newfont;
|
||||
}
|
||||
|
||||
int lcd_getfont(void)
|
||||
{
|
||||
return lcd_current_viewport->font;
|
||||
}
|
||||
|
||||
int lcd_getstringsize(const unsigned char *str, int *w, int *h)
|
||||
{
|
||||
return font_getstringsize(str, w, h, lcd_current_viewport->font);
|
||||
}
|
||||
|
||||
void lcd_set_backdrop(fb_data* backdrop)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue