From 232571c61a0120e71d980e47351d0656475dcbb5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 15 Sep 2012 11:48:20 +0000 Subject: code cleanup: replace macro for BLI_rect size/center with inline functions. --- source/blender/blenfont/intern/blf_font.c | 8 ++++---- source/blender/blenfont/intern/blf_glyph.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 02b66993c0a..6527c5c4823 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -430,8 +430,8 @@ void blf_font_width_and_height(FontBLF *font, const char *str, float *width, flo } blf_font_boundbox(font, str, &box); - *width = (BLI_RCT_SIZE_X(&box) * xa); - *height = (BLI_RCT_SIZE_Y(&box) * ya); + *width = (BLI_rctf_size_x(&box) * xa); + *height = (BLI_rctf_size_y(&box) * ya); } float blf_font_width(FontBLF *font, const char *str) @@ -445,7 +445,7 @@ float blf_font_width(FontBLF *font, const char *str) xa = 1.0f; blf_font_boundbox(font, str, &box); - return BLI_RCT_SIZE_X(&box) * xa; + return BLI_rctf_size_x(&box) * xa; } float blf_font_height(FontBLF *font, const char *str) @@ -459,7 +459,7 @@ float blf_font_height(FontBLF *font, const char *str) ya = 1.0f; blf_font_boundbox(font, str, &box); - return BLI_RCT_SIZE_Y(&box) * ya; + return BLI_rctf_size_y(&box) * ya; } float blf_font_fixed_width(FontBLF *font) diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 63225651e5b..91ecded88be 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -415,7 +415,7 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y) g->uv[1][1] = ((float)(g->yoff + g->height)) / ((float)gc->p2_height); /* update the x offset for the next glyph. */ - gc->x_offs += (int)(BLI_RCT_SIZE_X(&g->box) + gc->pad); + gc->x_offs += (int)(BLI_rctf_size_x(&g->box) + gc->pad); gc->rem_glyphs--; g->build_tex = 1; -- cgit v1.2.3