diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-15 15:48:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-15 15:48:20 +0400 |
commit | 232571c61a0120e71d980e47351d0656475dcbb5 (patch) | |
tree | 1980460d86e5743306ce676f28c5feb399248469 /source/blender/editors/screen/glutil.c | |
parent | 219b748dfc556d9920434fc67a9d0e980e8e7fab (diff) |
code cleanup: replace macro for BLI_rect size/center with inline functions.
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index c93f4156eeb..24053d76672 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -669,8 +669,8 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo void glaDefine2DArea(rcti *screen_rect) { - const int sc_w = BLI_RCT_SIZE_X(screen_rect) + 1; - const int sc_h = BLI_RCT_SIZE_Y(screen_rect) + 1; + const int sc_w = BLI_rcti_size_x(screen_rect) + 1; + const int sc_h = BLI_rcti_size_y(screen_rect) + 1; glViewport(screen_rect->xmin, screen_rect->ymin, sc_w, sc_h); glScissor(screen_rect->xmin, screen_rect->ymin, sc_w, sc_h); @@ -714,10 +714,10 @@ void gla2DSetMap(gla2DDrawInfo *di, rctf *rect) di->world_rect = *rect; - sc_w = BLI_RCT_SIZE_X(&di->screen_rect); - sc_h = BLI_RCT_SIZE_Y(&di->screen_rect); - wo_w = BLI_RCT_SIZE_X(&di->world_rect); - wo_h = BLI_RCT_SIZE_Y(&di->world_rect); + sc_w = BLI_rcti_size_x(&di->screen_rect); + sc_h = BLI_rcti_size_y(&di->screen_rect); + wo_w = BLI_rcti_size_x(&di->world_rect); + wo_h = BLI_rcti_size_y(&di->world_rect); di->wo_to_sc[0] = sc_w / wo_w; di->wo_to_sc[1] = sc_h / wo_h; @@ -745,10 +745,10 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect) di->world_rect.ymax = di->screen_rect.ymax; } - sc_w = BLI_RCT_SIZE_X(&di->screen_rect); - sc_h = BLI_RCT_SIZE_Y(&di->screen_rect); - wo_w = BLI_RCT_SIZE_X(&di->world_rect); - wo_h = BLI_RCT_SIZE_Y(&di->world_rect); + sc_w = BLI_rcti_size_x(&di->screen_rect); + sc_h = BLI_rcti_size_y(&di->screen_rect); + wo_w = BLI_rcti_size_x(&di->world_rect); + wo_h = BLI_rcti_size_y(&di->world_rect); di->wo_to_sc[0] = sc_w / wo_w; di->wo_to_sc[1] = sc_h / wo_h; |