diff --git a/ChangeLog b/ChangeLog index f10573220f..d3f1591c48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-15 Martin Nordholts + + * app/core/gimpimage-arrange.c (compute_offset): Use + gimp_vectors_bounds() instead of gimp_item_offsets|width|height() + when calculating size and position for a path. Fixes bug #486517. + 2007-10-15 Martin Nordholts * app/tools/gimpaligntool.c (gimp_align_tool_draw): Use @@ -80,7 +86,7 @@ * app/tools/gimprectangletool.c (gimp_rectangle_tool_options_notify): When Fixed: Size/Aspect ratio numbers are swapped and the Fixed:-rule is active, swap - width and height on any pending rectangle. Fixed bug #479999. + width and height on any pending rectangle. Fixes bug #479999. 2007-10-13 Martin Nordholts diff --git a/app/core/gimpimage-arrange.c b/app/core/gimpimage-arrange.c index 9fd980acf0..c94bfcbe84 100644 --- a/app/core/gimpimage-arrange.c +++ b/app/core/gimpimage-arrange.c @@ -20,8 +20,12 @@ #include +#include "libgimpmath/gimpmath.h" + #include "core-types.h" +#include "vectors/gimpvectors.h" + #include "gimpimage.h" #include "gimpimage-arrange.h" #include "gimpimage-guides.h" @@ -274,9 +278,25 @@ compute_offset (GObject *object, { GimpItem *item = GIMP_ITEM (object); - gimp_item_offsets (item, &object_offset_x, &object_offset_y); - object_height = gimp_item_height (item); - object_width = gimp_item_width (item); + if (GIMP_IS_VECTORS (object)) + { + gdouble x1_f, y1_f, x2_f, y2_f; + + gimp_vectors_bounds (GIMP_VECTORS (item), + &x1_f, &y1_f, + &x2_f, &y2_f); + + object_offset_x = ROUND (x1_f); + object_offset_y = ROUND (y1_f); + object_width = ROUND (x2_f - x1_f); + object_height = ROUND (y2_f - y1_f); + } + else + { + gimp_item_offsets (item, &object_offset_x, &object_offset_y); + object_height = gimp_item_height (item); + object_width = gimp_item_width (item); + } } else if (GIMP_IS_GUIDE (object)) {