summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25d617f)
raw | patch | inline | side by side (parent: 25d617f)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 24 Aug 2007 01:58:15 +0000 (01:58 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 24 Aug 2007 01:58:15 +0000 (01:58 +0000) |
src/display/sodipodi-ctrl.cpp | patch | blob | history | |
src/display/sodipodi-ctrl.h | patch | blob | history |
index 71786fd963cd878aa97b8e73a081682a7e957193..27f53633cd487b3eac36421d5e1de1427f90ba78 100644 (file)
ctrl->stroked = 0;
ctrl->fill_color = 0x000000ff;
ctrl->stroke_color = 0x000000ff;
+ ctrl->_moved = false;
ctrl->box.x0 = ctrl->box.y0 = ctrl->box.x1 = ctrl->box.y1 = 0;
ctrl->cache = NULL;
@@ -204,6 +205,8 @@ sp_ctrl_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags
sp_canvas_item_reset_bounds (item);
+ if (!ctrl->_moved) return;
+
if (ctrl->shown) {
sp_canvas_request_redraw (item->canvas, ctrl->box.x0, ctrl->box.y0, ctrl->box.x1 + 1, ctrl->box.y1 + 1);
}
void SPCtrl::moveto (NR::Point const p) {
sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (this), NR::Matrix(NR::translate (p)));
+ _moved = true;
}
index c0e584ce21afef560f0c2363950d90de367ba557..2b2254d14249f78cc0d1a6556ccd14a6993a41ab 100644 (file)
guint stroked : 1;
guint32 fill_color;
guint32 stroke_color;
+ bool _moved;
NRRectL box; /* NB! x1 & y1 are included */
guchar *cache;