Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-01-15 06:00:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-15 06:40:40 +0400
commitb8b412230b1e1ed43295d5c299477a2cba73355e (patch)
tree0b3d61142c7a0490293c975a636165057f20c58e /source/blender/editors/gpencil/drawgpencil.c
parente5c7535bebc37e04489fac4e88beca8cc5677d7d (diff)
Code Cleanup: use iroundf
also increase precision of rctf print functions
Diffstat (limited to 'source/blender/editors/gpencil/drawgpencil.c')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c8
1 files changed, 4 insertions, 4 deletions
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;