From b8b412230b1e1ed43295d5c299477a2cba73355e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Jan 2014 13:00:03 +1100 Subject: Code Cleanup: use iroundf also increase precision of rctf print functions --- source/blender/editors/gpencil/drawgpencil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 294a50909cb..971ab4dbda5 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -784,10 +784,10 @@ void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, bool only3d) rctf rectf; ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, TRUE); /* no shift */ - offsx = floorf(rectf.xmin + 0.5f); - offsy = floorf(rectf.ymin + 0.5f); - winx = floorf((rectf.xmax - rectf.xmin) + 0.5f); - winy = floorf((rectf.ymax - rectf.ymin) + 0.5f); + offsx = iroundf(rectf.xmin); + offsy = iroundf(rectf.ymin); + winx = iroundf(rectf.xmax - rectf.xmin); + winy = iroundf(rectf.ymax - rectf.ymin); } else { offsx = 0; -- cgit v1.2.3