diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-03 09:40:42 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-03 09:40:42 +0000 |
| commit | def37b17e61364995fc195de6b07eafbef255d52 (patch) | |
| tree | a89e0567133a0bc4cc17ebcb94d478068daee7bd /src/draw-context.cpp | |
| parent | When drawing with activated shape in pencil/pen tool, apply the original stro... (diff) | |
| download | inkscape-def37b17e61364995fc195de6b07eafbef255d52.tar.gz inkscape-def37b17e61364995fc195de6b07eafbef255d52.zip | |
Add new shape 'crescendo' in dropdown box of pen tool
(bzr r6129)
Diffstat (limited to 'src/draw-context.cpp')
| -rw-r--r-- | src/draw-context.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp index 92bba8104..c40ea1991 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -274,7 +274,6 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item) bool shape_applied = false; SPCSSAttr *css_item = sp_css_attr_from_object (SP_OBJECT(item), SP_STYLE_FLAG_ALWAYS); - const char *cfill = sp_repr_css_property(css_item, "fill", "none"); const char *cstroke = sp_repr_css_property(css_item, "stroke", "none"); switch (shape) { @@ -287,9 +286,25 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item) static_cast<LPEPatternAlongPath*>(lpe)->pattern.on_paste_button_click(); shape_applied = true; + break; } case 2: { + // TODO: this is only for illustration (we create a "crescendo"-shaped path + // manually; eventually we should read the path from a separate file) + SPCurve *c = new SPCurve(); + c->moveto(0,5); + c->lineto(200,10); + c->lineto(200,0); + c->closepath(); + spdc_paste_curve_as_param_path(c, dc, item); + c->unref(); + + shape_applied = true; + break; + } + case 3: + { // TODO: this is only for illustration (we create a "decrescendo"-shaped path // manually; eventually we should read the path from a separate file) SPCurve *c = new SPCurve(); @@ -301,6 +316,7 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item) c->unref(); shape_applied = true; + break; } default: break; |
