Commit a80795e2 authored by Michael Natterer's avatar Michael Natterer 😴

app: remove "GeglRectangle visible" from gimp_image_map_apply()

because we now use a filter and the image projection updates
the visible part only.
parent 3f51850d
......@@ -259,8 +259,7 @@ gimp_image_map_new (GimpDrawable *drawable,
}
void
gimp_image_map_apply (GimpImageMap *image_map,
const GeglRectangle *visible)
gimp_image_map_apply (GimpImageMap *image_map)
{
GimpImage *image;
GimpChannel *mask;
......
......@@ -49,16 +49,16 @@ struct _GimpImageMapClass
GType gimp_image_map_get_type (void) G_GNUC_CONST;
GimpImageMap * gimp_image_map_new (GimpDrawable *drawable,
const gchar *undo_desc,
GeglNode *operation,
const gchar *stock_id);
void gimp_image_map_apply (GimpImageMap *image_map,
const GeglRectangle *visible);
void gimp_image_map_commit (GimpImageMap *image_map,
GimpProgress *progress);
void gimp_image_map_abort (GimpImageMap *image_map);
GimpImageMap * gimp_image_map_new (GimpDrawable *drawable,
const gchar *undo_desc,
GeglNode *operation,
const gchar *stock_id);
void gimp_image_map_apply (GimpImageMap *image_map);
void gimp_image_map_commit (GimpImageMap *image_map,
GimpProgress *progress);
void gimp_image_map_abort (GimpImageMap *image_map);
#endif /* __GIMP_IMAGE_MAP_H__ */
......@@ -48,8 +48,6 @@
#include "widgets/gimphelp-ids.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
#include "gimpcagetool.h"
#include "gimpcageoptions.h"
......@@ -1262,30 +1260,5 @@ gimp_cage_tool_image_map_flush (GimpImageMap *image_map,
static void
gimp_cage_tool_image_map_update (GimpCageTool *ct)
{
GimpTool *tool = GIMP_TOOL (ct);
GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
GimpItem *item = GIMP_ITEM (tool->drawable);
gint x, y;
gint w, h;
gint off_x, off_y;
GeglRectangle visible;
gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h);
gimp_item_get_offset (item, &off_x, &off_y);
gimp_rectangle_intersect (x, y, w, h,
off_x,
off_y,
gimp_item_get_width (item),
gimp_item_get_height (item),
&visible.x,
&visible.y,
&visible.width,
&visible.height);
visible.x -= off_x;
visible.y -= off_y;
gimp_image_map_apply (ct->image_map, &visible);
gimp_image_map_apply (ct->image_map);
}
......@@ -59,7 +59,6 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-transform.h"
#include "display/gimptooldialog.h"
#include "gimpcoloroptions.h"
......@@ -581,34 +580,10 @@ gimp_image_map_tool_color_picked (GimpColorTool *color_tool,
static void
gimp_image_map_tool_map (GimpImageMapTool *tool)
{
GimpDisplayShell *shell = gimp_display_get_shell (GIMP_TOOL (tool)->display);
GimpItem *item = GIMP_ITEM (tool->drawable);
gint x, y;
gint w, h;
gint off_x, off_y;
GeglRectangle visible;
if (GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->map)
GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->map (tool);
gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h);
gimp_item_get_offset (item, &off_x, &off_y);
gimp_rectangle_intersect (x, y, w, h,
off_x,
off_y,
gimp_item_get_width (item),
gimp_item_get_height (item),
&visible.x,
&visible.y,
&visible.width,
&visible.height);
visible.x -= off_x;
visible.y -= off_y;
gimp_image_map_apply (tool->image_map, &visible);
gimp_image_map_apply (tool->image_map);
}
static void
......
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