Evas text: clean up evas_text_style_pad_get a bit further.

SVN revision: 59284
This commit is contained in:
Tom Hacohen 2011-05-09 07:40:14 +00:00
parent 7cd241ae62
commit e607c581f0
1 changed files with 99 additions and 99 deletions

View File

@ -1398,17 +1398,17 @@ evas_string_char_len_get(const char *str)
void
evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b)
{
int sl = 0, sr = 0, st = 0, sb = 0;
/* Don't calc anything if there's no style. */
if (style != EVAS_TEXT_STYLE_PLAIN)
{
int shad_sz = 0, shad_dst = 0, out_sz = 0;
int dx = 0, minx = 0, maxx = 0;
int dy = 0, miny = 0, maxy = 0;
int sl = 0, sr = 0, st = 0, sb = 0;
Eina_Bool have_shadow = EINA_FALSE;
/* Don't calc anything if there's no style. */
if (style == EVAS_TEXT_STYLE_PLAIN)
goto end;
switch (style & EVAS_TEXT_STYLE_MASK_BASIC)
{
case EVAS_TEXT_STYLE_SHADOW:
@ -1515,8 +1515,8 @@ evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int
if (sl < -minx) sl = -minx;
if (sb < maxy) sb = maxy;
if (st < -miny) st = -miny;
}
end:
if (l) *l = sl;
if (r) *r = sr;
if (t) *t = st;