Author: Carlos Lopez <[email protected]>
Date:   Sun Mar  3 12:39:09 2013 +0100

Draw sharp one pixel bounding box in all cases.

---

 .../src/gui/workarearenderer/renderer_bbox.cpp     |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/synfig-studio/src/gui/workarearenderer/renderer_bbox.cpp 
b/synfig-studio/src/gui/workarearenderer/renderer_bbox.cpp
index 0d24a96..0dad9d4 100644
--- a/synfig-studio/src/gui/workarearenderer/renderer_bbox.cpp
+++ b/synfig-studio/src/gui/workarearenderer/renderer_bbox.cpp
@@ -84,7 +84,7 @@ Renderer_BBox::render_vfunc(
 
        const synfig::Point curr_point(get_bbox().get_min());
        const synfig::Point drag_point(get_bbox().get_max());
-       if(get_bbox().area()<10000000000000000.0)
+       if(get_bbox().area()<10000000000000000.0 && 
get_bbox().area()>0.00000000000000001)
        {
                Point 
tl(std::min(drag_point[0],curr_point[0]),std::min(drag_point[1],curr_point[1]));
                Point 
br(std::max(drag_point[0],curr_point[0]),std::max(drag_point[1],curr_point[1]));
@@ -115,10 +115,10 @@ Renderer_BBox::render_vfunc(
 #endif
 
                cr->rectangle(
-                       tl[0],
-                       tl[1],
-                       br[0]-tl[0],
-                       br[1]-tl[1]
+                       int(tl[0])+0.5,
+                       int(tl[1])+0.5,
+                       int(br[0]-tl[0]+1),
+                       int(br[1]-tl[1]+1)
                );
                cr->stroke();
 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to