diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2007-06-21 13:01:57 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2007-06-21 13:01:57 +0000 |
| commit | cf233ff5bbc68bd598ef4b81c7b4063548f2eff9 (patch) | |
| tree | 56d48726d21ad368509a945bf7df91966115cc9c /src/tools-switch.cpp | |
| parent | Fix function plotter for the most common case where there are no transforms a... (diff) | |
| download | inkscape-cf233ff5bbc68bd598ef4b81c7b4063548f2eff9.tar.gz inkscape-cf233ff5bbc68bd598ef4b81c7b4063548f2eff9.zip | |
First (very limited) version of the 3D box tool; allows for drawing of new boxes in a fixed perspective without any live interaction.
(bzr r3084)
Diffstat (limited to 'src/tools-switch.cpp')
| -rw-r--r-- | src/tools-switch.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 339326359..bc9655a83 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -27,6 +27,8 @@ #include "sp-path.h" #include "rect-context.h" #include "sp-rect.h" +#include "box3d-context.h" +#include "box3d.h" #include "arc-context.h" #include "sp-ellipse.h" #include "star-context.h" @@ -54,6 +56,7 @@ static char const *const tool_names[] = { "tools.select", "tools.nodes", "tools.shapes.rect", + "tools.shapes.3dbox", "tools.shapes.arc", "tools.shapes.star", "tools.shapes.spiral", @@ -74,6 +77,7 @@ static char const *const tool_ids[] = { "select", "nodes", "rect", + "3dbox", "arc", "star", "spiral", @@ -143,6 +147,12 @@ tools_switch(SPDesktop *dt, int num) inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> to create a rectangle. <b>Drag controls</b> to round corners and resize. <b>Click</b> to select.")); break; + case TOOLS_SHAPES_3DBOX: + dt->set_event_context(SP_TYPE_3DBOX_CONTEXT, tool_names[num]); + dt->activate_guides(false); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> to create a 3D box. <b>Drag controls</b> to resize in perspective. <b>Click</b> to select.")); + break; case TOOLS_SHAPES_ARC: dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); dt->activate_guides(false); |
