[gimp] app: add gimp_tile_handler_projection_undo_invalidate()



commit b44ffdd198fea10942d8025ae65fd97c0496b3c3
Author: Michael Natterer <mitch gimp org>
Date:   Fri Aug 2 20:19:00 2013 +0200

    app: add gimp_tile_handler_projection_undo_invalidate()
    
    which removes a rectangle from the handler's dirty region, for cases
    where the caller knows that the rectangle has been explicitly
    constructed. Only needed by the gtk3-port branch.

 app/gegl/gimptilehandlerprojection.c |   14 ++++++++++++++
 app/gegl/gimptilehandlerprojection.h |    5 +++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/app/gegl/gimptilehandlerprojection.c b/app/gegl/gimptilehandlerprojection.c
index cc49d64..1a57b42 100644
--- a/app/gegl/gimptilehandlerprojection.c
+++ b/app/gegl/gimptilehandlerprojection.c
@@ -353,3 +353,17 @@ gimp_tile_handler_projection_invalidate (GimpTileHandlerProjection *projection,
         }
     }
 }
+
+void
+gimp_tile_handler_projection_undo_invalidate (GimpTileHandlerProjection *projection,
+                                              gint                       x,
+                                              gint                       y,
+                                              gint                       width,
+                                              gint                       height)
+{
+  cairo_rectangle_int_t rect = { x, y, width, height };
+
+  g_return_if_fail (GIMP_IS_TILE_HANDLER_PROJECTION (projection));
+
+  cairo_region_subtract_rectangle (projection->dirty_region, &rect);
+}
diff --git a/app/gegl/gimptilehandlerprojection.h b/app/gegl/gimptilehandlerprojection.h
index a72684c..e1c6231 100644
--- a/app/gegl/gimptilehandlerprojection.h
+++ b/app/gegl/gimptilehandlerprojection.h
@@ -68,6 +68,11 @@ void              gimp_tile_handler_projection_invalidate (GimpTileHandlerProjec
                                                            gint                       y,
                                                            gint                       width,
                                                            gint                       height);
+void         gimp_tile_handler_projection_undo_invalidate (GimpTileHandlerProjection *projection,
+                                                           gint                       x,
+                                                           gint                       y,
+                                                           gint                       width,
+                                                           gint                       height);
 
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]