diff --git a/src/display/drawing.cpp b/src/display/drawing.cpp index bf203c898502d22f95ef665ca76d6c0d1553b08a..d01fb8d0a2733559ee70747f7742a799e7f00c2e 100644 --- a/src/display/drawing.cpp +++ b/src/display/drawing.cpp @@ -14,6 +14,7 @@ #include #include "display/drawing.h" +#include "display/control/canvas-item-drawing.h" #include "nr-filter-gaussian.h" #include "nr-filter-types.h" @@ -161,6 +162,12 @@ Drawing::setGrayscaleMatrix(gdouble value_matrix[20]) { std::vector (value_matrix, value_matrix + 20) ); } +void +Drawing::update(Geom::IntRect const &area) +{ + update(area, _canvas_item_drawing ? _canvas_item_drawing->get_context() : UpdateContext()); +} + void Drawing::update(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset) { diff --git a/src/display/drawing.h b/src/display/drawing.h index 2058f672b87c4f6386e11eca714cc529d353be75..4c44e9ce28ccbd4c63b0d7f102904524457220e6 100644 --- a/src/display/drawing.h +++ b/src/display/drawing.h @@ -74,7 +74,9 @@ public: void setGrayscaleMatrix(double value_matrix[20]); - void update(Geom::IntRect const &area = Geom::IntRect::infinite(), UpdateContext const &ctx = UpdateContext(), unsigned flags = DrawingItem::STATE_ALL, unsigned reset = 0); + void update(Geom::IntRect const &area = Geom::IntRect::infinite()); + void update(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags = DrawingItem::STATE_ALL, unsigned reset = 0); + void render(DrawingContext &dc, Geom::IntRect const &area, unsigned flags = 0, int antialiasing = -1); DrawingItem *pick(Geom::Point const &p, double delta, unsigned flags);