forked from len0rd/rockbox
Support getting width OR height of string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2461 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
44ee3f6bfb
commit
8fcdede340
1 changed files with 4 additions and 2 deletions
|
@ -244,7 +244,9 @@ int lcd_getstringsize(unsigned char *str, int *w, int *h)
|
||||||
/* get proportional width and glyph bits*/
|
/* get proportional width and glyph bits*/
|
||||||
width += pf->width? pf->width[ch]: pf->maxwidth;
|
width += pf->width? pf->width[ch]: pf->maxwidth;
|
||||||
}
|
}
|
||||||
|
if ( w )
|
||||||
*w = width;
|
*w = width;
|
||||||
|
if ( h )
|
||||||
*h = pf->height;
|
*h = pf->height;
|
||||||
|
|
||||||
return width;
|
return width;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue