summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 204000a)
raw | patch | inline | side by side (parent: 204000a)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 15 Apr 2007 04:51:27 +0000 (04:51 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 15 Apr 2007 04:51:27 +0000 (04:51 +0000) |
src/dyna-draw-context.cpp | patch | blob | history | |
src/dyna-draw-context.h | patch | blob | history |
index 1ee339465dc2f1b18562f23d795cecc2c0e384eb..d82754dbab791b67e58b0069381d968b0674dc0b 100644 (file)
ddc->keep_selected = true;
ddc->hatch_spacing = 0;
+ ddc->hatch_spacing_step = 0;
new (&ddc->hatch_pointer_past) std::list<double>();
new (&ddc->hatch_nearest_past) std::list<double>();
ddc->hatch_last_nearest = NR::Point(0,0);
NULL,
event->button.time);
- if (event->motion.state & GDK_MOD1_MASK) {
- sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 3);
- }
-
ret = TRUE;
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 3);
dc->is_drawing = true;
}
break;
case GDK_BUTTON_RELEASE:
sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time);
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
dc->is_drawing = false;
if ( dc->is_dilating && event->button.button == 1 ) {
dc->is_dilating = false;
- sp_canvas_end_forced_full_redraws(desktop->canvas);
sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(dc)->desktop),
SP_VERB_CONTEXT_CALLIGRAPHIC,
(event->button.state & GDK_SHIFT_MASK ? _("Thicken paths") : _("Thin paths")));
dc->hatch_item = NULL;
dc->hatch_livarot_path = NULL;
+ if (dc->hatch_spacing != 0 && !dc->keep_selected) {
+ // we do not select the newly drawn path, so increase spacing by step
+ if (dc->hatch_spacing_step == 0) {
+ dc->hatch_spacing_step = dc->hatch_spacing;
+ }
+ dc->hatch_spacing += dc->hatch_spacing_step;
+ }
+
dc->_message_context->clear();
ret = TRUE;
}
case GDK_Control_R:
dc->_message_context->clear();
dc->hatch_spacing = 0;
+ dc->hatch_spacing_step = 0;
break;
case GDK_Alt_L:
case GDK_Alt_R:
} else {
if (dc->keep_selected) {
sp_desktop_selection(desktop)->set(dc->repr);
- } else {
- sp_desktop_selection(desktop)->clear();
- }
+ }
}
} else {
index 71fc40f8c405808d9bcceabbacea9131e65e5986..3bb8ab5f7528a67bb2651e72967e4c14b5372e58 100644 (file)
--- a/src/dyna-draw-context.h
+++ b/src/dyna-draw-context.h
bool keep_selected;
double hatch_spacing;
+ double hatch_spacing_step;
SPItem *hatch_item;
Path *hatch_livarot_path;
std::list<double> hatch_nearest_past;