mirror of https://github.com/GNOME/gimp.git
app: various fixes/cleanups to last commits
This commit is contained in:
parent
3a4a00c71e
commit
30429e30e2
|
@ -43,13 +43,30 @@ gimp_drawable_offset (GimpDrawable *drawable,
|
|||
gint offset_y)
|
||||
{
|
||||
GeglNode *node;
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
|
||||
if (! gimp_item_mask_intersect (GIMP_ITEM (drawable),
|
||||
NULL, NULL, &width, &height))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (wrap_around)
|
||||
fill_type = GIMP_OFFSET_WRAP_AROUND;
|
||||
|
||||
if (fill_type == GIMP_OFFSET_WRAP_AROUND)
|
||||
{
|
||||
offset_x %= width;
|
||||
offset_y %= height;
|
||||
}
|
||||
|
||||
if (offset_x == 0 || offset_y == 0)
|
||||
return;
|
||||
|
||||
node = gegl_node_new_child (NULL,
|
||||
"operation", "gimp:offset",
|
||||
"context", context,
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "operations-types.h"
|
||||
|
||||
#include "gegl/gimp-gegl-loops.h"
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "core/gimpcontext.h"
|
||||
|
@ -376,8 +377,8 @@ gimp_operation_offset_process (GeglOperation *operation,
|
|||
offset_roi.x -= offset_x;
|
||||
offset_roi.y -= offset_y;
|
||||
|
||||
gegl_buffer_copy (input, &offset_roi, GEGL_ABYSS_NONE,
|
||||
output, &offset_bounds);
|
||||
gimp_gegl_buffer_copy (input, &offset_roi, GEGL_ABYSS_NONE,
|
||||
output, &offset_bounds);
|
||||
}
|
||||
else if (color)
|
||||
{
|
||||
|
@ -430,6 +431,11 @@ gimp_operation_offset_get_offset (GimpOperationOffset *offset,
|
|||
if (*y < 0)
|
||||
*y += bounds.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
*x = CLAMP (*x, -bounds.width, +bounds.width);
|
||||
*y = CLAMP (*y, -bounds.height, +bounds.height);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -218,7 +218,6 @@
|
|||
#define GIMP_HELP_LAYER_ROTATE_90 "gimp-layer-rotate-90"
|
||||
#define GIMP_HELP_LAYER_ROTATE_180 "gimp-layer-rotate-180"
|
||||
#define GIMP_HELP_LAYER_ROTATE_270 "gimp-layer-rotate-270"
|
||||
#define GIMP_HELP_LAYER_OFFSET "gimp-layer-offset"
|
||||
#define GIMP_HELP_LAYER_RESIZE "gimp-layer-resize"
|
||||
#define GIMP_HELP_LAYER_RESIZE_TO_IMAGE "gimp-layer-resize-to-image"
|
||||
#define GIMP_HELP_LAYER_SCALE "gimp-layer-scale"
|
||||
|
|
|
@ -11879,11 +11879,6 @@ image_scale_dialog_new
|
|||
module_dialog_new
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>offset-dialog</FILE>
|
||||
offset_dialog_new
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>palette-import-dialog</FILE>
|
||||
palette_import_dialog_new
|
||||
|
|
Loading…
Reference in New Issue