added two functions I needed in etox

int evas_get_text_height(Evas e, Evas_Object o)
int evas_get_text_width(Evas e, Evas_Object o)

very simple and straightforward.


SVN revision: 3990
This commit is contained in:
Mandrake 2000-12-14 07:23:27 +00:00
parent 9215204dcd
commit f6caa2df4d
2 changed files with 28 additions and 0 deletions

View File

@ -188,6 +188,8 @@ double evas_screen_y_to_world(Evas e, int y);
char *evas_get_text_string(Evas e, Evas_Object o);
char *evas_get_text_font(Evas e, Evas_Object o);
int evas_get_text_size(Evas e, Evas_Object o);
int evas_get_text_width(Evas e, Evas_Object o);
int evas_get_text_height(Evas e, Evas_Object o);
int evas_text_at_position(Evas e, Evas_Object o, double x, double y, int *char_x, int *char_y, int *char_w, int *char_h);
void evas_text_at(Evas e, Evas_Object o, int index, int *char_x, int *char_y, int *char_w, int *char_h);
void evas_text_get_ascent_descent(Evas e, Evas_Object o, double *ascent, double *descent);

View File

@ -207,6 +207,32 @@ evas_get_text_size(Evas e, Evas_Object o)
return oo->current.size;
}
int
evas_get_text_height(Evas e, Evas_Object o)
{
Evas_Object_Text oo;
if (!e) return 0;
if (!o) return 0;
IF_OBJ(o, OBJECT_TEXT) return 0;
oo = o;
return oo->current.string.h;
}
int
evas_get_text_width(Evas e, Evas_Object o)
{
Evas_Object_Text oo;
if (!e) return 0;
if (!o) return 0;
IF_OBJ(o, OBJECT_TEXT) return 0;
oo = o;
return oo->current.string.w;
}
int
evas_text_at_position(Evas e, Evas_Object o, double x, double y,
int *char_x, int *char_y, int *char_w, int *char_h)