Commit 2d90edbc authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

make sure channels end up at (0, 0) after scaling and resizing. Fixes bug

2003-06-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.c (gimp_channel_scale, resize): make sure
	channels end up at (0, 0) after scaling and resizing.
	Fixes bug #114213.
parent 1871d9cc
2003-06-02 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_scale, resize): make sure
channels end up at (0, 0) after scaling and resizing.
Fixes bug #114213.
2003-06-02 Michael Natterer <mitch@gimp.org> 2003-06-02 Michael Natterer <mitch@gimp.org>
Implemented DISSOLVE_MODE the way it should have always been. Implemented DISSOLVE_MODE the way it should have always been.
...@@ -370,6 +370,12 @@ gimp_channel_scale (GimpItem *item, ...@@ -370,6 +370,12 @@ gimp_channel_scale (GimpItem *item,
_("Scale Channel"), _("Scale Channel"),
channel); channel);
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
{
new_offset_x = 0;
new_offset_y = 0;
}
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height, GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
new_offset_x, new_offset_y, new_offset_x, new_offset_y,
interpolation_type); interpolation_type);
...@@ -396,6 +402,12 @@ gimp_channel_resize (GimpItem *item, ...@@ -396,6 +402,12 @@ gimp_channel_resize (GimpItem *item,
GIMP_ITEM_CLASS (parent_class)->resize (item, new_width, new_height, GIMP_ITEM_CLASS (parent_class)->resize (item, new_width, new_height,
offset_x, offset_y); offset_x, offset_y);
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
{
item->offset_x = 0;
item->offset_y = 0;
}
/* bounds are now unknown */ /* bounds are now unknown */
channel->bounds_known = FALSE; channel->bounds_known = FALSE;
} }
......
...@@ -370,6 +370,12 @@ gimp_channel_scale (GimpItem *item, ...@@ -370,6 +370,12 @@ gimp_channel_scale (GimpItem *item,
_("Scale Channel"), _("Scale Channel"),
channel); channel);
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
{
new_offset_x = 0;
new_offset_y = 0;
}
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height, GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
new_offset_x, new_offset_y, new_offset_x, new_offset_y,
interpolation_type); interpolation_type);
...@@ -396,6 +402,12 @@ gimp_channel_resize (GimpItem *item, ...@@ -396,6 +402,12 @@ gimp_channel_resize (GimpItem *item,
GIMP_ITEM_CLASS (parent_class)->resize (item, new_width, new_height, GIMP_ITEM_CLASS (parent_class)->resize (item, new_width, new_height,
offset_x, offset_y); offset_x, offset_y);
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
{
item->offset_x = 0;
item->offset_y = 0;
}
/* bounds are now unknown */ /* bounds are now unknown */
channel->bounds_known = FALSE; channel->bounds_known = FALSE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment