forked from enlightenment/efl
Evas text: clean up evas_text_style_pad_get a bit further.
SVN revision: 59284
This commit is contained in:
parent
7cd241ae62
commit
e607c581f0
|
@ -1398,17 +1398,17 @@ evas_string_char_len_get(const char *str)
|
||||||
|
|
||||||
void
|
void
|
||||||
evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b)
|
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 shad_sz = 0, shad_dst = 0, out_sz = 0;
|
||||||
int dx = 0, minx = 0, maxx = 0;
|
int dx = 0, minx = 0, maxx = 0;
|
||||||
int dy = 0, miny = 0, maxy = 0;
|
int dy = 0, miny = 0, maxy = 0;
|
||||||
int sl = 0, sr = 0, st = 0, sb = 0;
|
|
||||||
Eina_Bool have_shadow = EINA_FALSE;
|
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)
|
switch (style & EVAS_TEXT_STYLE_MASK_BASIC)
|
||||||
{
|
{
|
||||||
case EVAS_TEXT_STYLE_SHADOW:
|
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 (sl < -minx) sl = -minx;
|
||||||
if (sb < maxy) sb = maxy;
|
if (sb < maxy) sb = maxy;
|
||||||
if (st < -miny) st = -miny;
|
if (st < -miny) st = -miny;
|
||||||
|
}
|
||||||
|
|
||||||
end:
|
|
||||||
if (l) *l = sl;
|
if (l) *l = sl;
|
||||||
if (r) *r = sr;
|
if (r) *r = sr;
|
||||||
if (t) *t = st;
|
if (t) *t = st;
|
||||||
|
|
Loading…
Reference in New Issue