Use gimp_vectors_bounds() instead of gimp_item_offsets|width|height() when

2007-10-15  Martin Nordholts  <martinn@svn.gnome.org>

	* 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.

svn path=/trunk/; revision=23833
This commit is contained in:
Martin Nordholts 2007-10-15 20:17:56 +00:00 committed by Martin Nordholts
parent 8690e913a7
commit e81fb95976
2 changed files with 30 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2007-10-15 Martin Nordholts <martinn@svn.gnome.org>
* 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 <martinn@svn.gnome.org>
* 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 <martinn@svn.gnome.org>

View File

@ -20,8 +20,12 @@
#include <glib-object.h>
#include "libgimpmath/gimpmath.h"
#include "core-types.h"
#include "vectors/gimpvectors.h"
#include "gimpimage.h"
#include "gimpimage-arrange.h"
#include "gimpimage-guides.h"
@ -274,10 +278,26 @@ compute_offset (GObject *object,
{
GimpItem *item = GIMP_ITEM (object);
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))
{
GimpGuide *guide = GIMP_GUIDE (object);