mirror of https://github.com/GNOME/gimp.git
app/core/gimpimage-scale.c app/core/gimpimage-rotate.c
2007-02-28 Sven Neumann <sven@gimp.org> * app/core/gimpimage-scale.c * app/core/gimpimage-rotate.c * app/core/gimpimage-resize.c * app/core/gimpimage-flip.c: cosmetics. svn path=/trunk/; revision=22021
This commit is contained in:
parent
bcbca9b612
commit
c294d9bc94
|
@ -1,3 +1,10 @@
|
|||
2007-02-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpimage-scale.c
|
||||
* app/core/gimpimage-rotate.c
|
||||
* app/core/gimpimage-resize.c
|
||||
* app/core/gimpimage-flip.c: cosmetics.
|
||||
|
||||
2007-02-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/base/pixel-surround.c: documentation.
|
||||
|
|
|
@ -43,11 +43,10 @@ gimp_image_flip (GimpImage *image,
|
|||
GimpOrientationType flip_type,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItem *item;
|
||||
GList *list;
|
||||
gdouble axis;
|
||||
gdouble progress_max;
|
||||
gdouble progress_current = 1.0;
|
||||
GList *list;
|
||||
gdouble axis;
|
||||
gdouble progress_max;
|
||||
gdouble progress_current = 1.0;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
|
@ -82,7 +81,7 @@ gimp_image_flip (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = (GimpItem *) list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_item_flip (item, context, flip_type, axis, TRUE);
|
||||
|
||||
|
@ -95,7 +94,7 @@ gimp_image_flip (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = (GimpItem *) list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_item_flip (item, context, flip_type, axis, FALSE);
|
||||
|
||||
|
@ -115,7 +114,7 @@ gimp_image_flip (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = (GimpItem *) list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_item_flip (item, context, flip_type, axis, FALSE);
|
||||
|
||||
|
|
|
@ -230,9 +230,10 @@ gimp_image_resize_to_layers (GimpImage *image,
|
|||
GimpContext *context,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
gint min_x, max_x, min_y, max_y;
|
||||
GList *list = GIMP_LIST (image->layers)->list;
|
||||
GList *list = GIMP_LIST (image->layers)->list;
|
||||
GimpItem *item;
|
||||
gint min_x, max_x;
|
||||
gint min_y, max_y;
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
|
|
|
@ -54,7 +54,6 @@ gimp_image_rotate (GimpImage *image,
|
|||
GimpRotationType rotate_type,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItem *item;
|
||||
GList *list;
|
||||
gdouble center_x;
|
||||
gdouble center_y;
|
||||
|
@ -108,7 +107,7 @@ gimp_image_rotate (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = (GimpItem *) list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_item_rotate (item, context, rotate_type, center_x, center_y, FALSE);
|
||||
|
||||
|
@ -124,7 +123,7 @@ gimp_image_rotate (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = (GimpItem *) list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_item_rotate (item, context, rotate_type, center_x, center_y, FALSE);
|
||||
|
||||
|
@ -157,9 +156,9 @@ gimp_image_rotate (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
gint off_x, off_y;
|
||||
|
||||
item = (GimpItem *) list->data;
|
||||
GimpItem *item = list->data;
|
||||
gint off_x;
|
||||
gint off_y;
|
||||
|
||||
gimp_item_offsets (item, &off_x, &off_y);
|
||||
|
||||
|
@ -193,7 +192,7 @@ gimp_image_rotate (GimpImage *image,
|
|||
|
||||
gimp_image_undo_push_image_resolution (image, NULL);
|
||||
|
||||
tmp = image->xresolution;
|
||||
tmp = image->xresolution;
|
||||
image->yresolution = image->xresolution;
|
||||
image->xresolution = tmp;
|
||||
}
|
||||
|
|
|
@ -48,16 +48,15 @@ gimp_image_scale (GimpImage *image,
|
|||
GimpInterpolationType interpolation_type,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItem *item;
|
||||
GimpProgress *sub_progress;
|
||||
GList *list;
|
||||
GList *remove = NULL;
|
||||
GList *remove = NULL;
|
||||
gint old_width;
|
||||
gint old_height;
|
||||
gdouble img_scale_w = 1.0;
|
||||
gdouble img_scale_h = 1.0;
|
||||
gdouble img_scale_w = 1.0;
|
||||
gdouble img_scale_h = 1.0;
|
||||
gint progress_steps;
|
||||
gint progress_current;
|
||||
gint progress_current = 0;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (image));
|
||||
g_return_if_fail (new_width > 0 && new_height > 0);
|
||||
|
@ -80,10 +79,10 @@ gimp_image_scale (GimpImage *image,
|
|||
/* Push the image size to the stack */
|
||||
gimp_image_undo_push_image_size (image, NULL);
|
||||
|
||||
old_width = image->width;
|
||||
old_height = image->height;
|
||||
img_scale_w = (gdouble) new_width / (gdouble) old_width;
|
||||
img_scale_h = (gdouble) new_height / (gdouble) old_height;
|
||||
old_width = image->width;
|
||||
old_height = image->height;
|
||||
img_scale_w = (gdouble) new_width / (gdouble) old_width;
|
||||
img_scale_h = (gdouble) new_height / (gdouble) old_height;
|
||||
|
||||
/* Set the new width and height */
|
||||
g_object_set (image,
|
||||
|
@ -96,7 +95,7 @@ gimp_image_scale (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_sub_progress_set_step (GIMP_SUB_PROGRESS (sub_progress),
|
||||
progress_current++, progress_steps);
|
||||
|
@ -111,7 +110,7 @@ gimp_image_scale (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_sub_progress_set_step (GIMP_SUB_PROGRESS (sub_progress),
|
||||
progress_current++, progress_steps);
|
||||
|
@ -134,7 +133,7 @@ gimp_image_scale (GimpImage *image,
|
|||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
item = list->data;
|
||||
GimpItem *item = list->data;
|
||||
|
||||
gimp_sub_progress_set_step (GIMP_SUB_PROGRESS (sub_progress),
|
||||
progress_current++, progress_steps);
|
||||
|
|
Loading…
Reference in New Issue