summaryrefslogtreecommitdiffstats
path: root/src/pencil-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-01-19 23:31:25 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-01-19 23:31:25 +0000
commit0afd549c4559664e33bab5d20ccdeca2ae39026f (patch)
tree55346a8116895e0e54dd967dc7b08a4e8a2a50f5 /src/pencil-context.cpp
parentFix bad markup in po/vi.po (diff)
downloadinkscape-0afd549c4559664e33bab5d20ccdeca2ae39026f.tar.gz
inkscape-0afd549c4559664e33bab5d20ccdeca2ae39026f.zip
Make creation of dots via Ctrl+click also possible in pen context; fill dots with current stroke color (and unset stroke); add preferences settings for dot radius and status bar messages; Shift+Ctrl+click varies the radius slightly
(bzr r4563)
Diffstat (limited to 'src/pencil-context.cpp')
-rw-r--r--src/pencil-context.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index f17337183..691dcb098 100644
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -229,28 +229,9 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve
default:
/* Set first point of sequence */
if (bevent.state & GDK_CONTROL_MASK) {
- /* Create object */
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc());
- Inkscape::XML::Node *repr = xml_doc->createElement("svg:path");
- repr->setAttribute("sodipodi:type", "arc");
- SPItem *item = SP_ITEM(desktop->currentLayer()->appendChildRepr(repr));
- Inkscape::GC::release(repr);
- NR::Matrix const i2d (sp_item_i2d_affine (item));
- NR::Point pp = p * i2d;
- sp_repr_set_svg_double (repr, "sodipodi:cx", pp[NR::X]);
- sp_repr_set_svg_double (repr, "sodipodi:cy", pp[NR::Y]);
- sp_repr_set_int (repr, "sodipodi:rx", 10);
- sp_repr_set_int (repr, "sodipodi:ry", 10);
-
- /* Set style */
- sp_desktop_apply_style_tool(desktop, repr, "tools.shapes.arc", false);
-
- item->updateRepr();
- desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Creating single point"));
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_PENCIL, _("Create single point"));
+ freehand_create_single_dot(event_context, p, "tools.freehand.pencil", bevent.state & GDK_SHIFT_MASK);
ret = true;
break;
-
}
if (anchor) {
p = anchor->dp;