[dia] Bug 688314 - Image border was not undrawn correctly



commit 01d44568315b1992710f13302c56884632dd82b1
Author: Hans Breuer <hans breuer org>
Date:   Sun Nov 18 13:24:17 2012 +0100

    Bug 688314 - Image border was not undrawn correctly
    
    The bounding box calculation was assuming a border drawn
    with the Element corners, but it is drawn completely
    outside of the Image element.

 objects/standard/image.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/objects/standard/image.c b/objects/standard/image.c
index 79d4782..e7a4fd2 100644
--- a/objects/standard/image.c
+++ b/objects/standard/image.c
@@ -456,7 +456,8 @@ image_update_data(Image *image)
   image->connections[8].pos.x = elem->corner.x + elem->width / 2.0;
   image->connections[8].pos.y = elem->corner.y + elem->height / 2.0;
   
-  extra->border_trans = (image->draw_border ? image->border_width / 2.0 : 0.0);
+  /* the image border is drawn vompletely outside of the image, so no /2.0 on border width */
+  extra->border_trans = (image->draw_border ? image->border_width : 0.0);
   element_update_boundingbox(elem);
   
   obj->position = elem->corner;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]