diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-11-09 06:16:01 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-11-09 06:16:01 +0000 |
| commit | 8f8a07610119425a2d3262365f769a10cb3fccd7 (patch) | |
| tree | 28ba985b4f6b62701c8997c578bdd216c4ac5e82 /src/tweak-context.cpp | |
| parent | try to fix "hidden method" warning (diff) | |
| download | inkscape-8f8a07610119425a2d3262365f769a10cb3fccd7.tar.gz inkscape-8f8a07610119425a2d3262365f769a10cb3fccd7.zip | |
refactoring, one MakeTweak method instead of a bunch largely similar methods
(bzr r4047)
Diffstat (limited to 'src/tweak-context.cpp')
| -rw-r--r-- | src/tweak-context.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index b662ca2de..4f761d8c3 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -400,26 +400,28 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi bool did_this = false; NR::Matrix i2doc(sp_item_i2doc_affine(item)); if (mode == TWEAK_MODE_SHRINK || mode == TWEAK_MODE_GROW) { - if (theShape->MakeOffset(theRes, + if (theShape->MakeTweak(tweak_mode_grow, theRes, mode == TWEAK_MODE_GROW? force : -force, join_straight, 4.0, - true, p[NR::X], p[NR::Y], radius, &i2doc) == 0) // 0 means the shape was actually changed + true, p, NR::Point(0,0), radius, &i2doc) == 0) // 0 means the shape was actually changed did_this = true; } else if (mode == TWEAK_MODE_ATTRACT || mode == TWEAK_MODE_REPEL) { - if (theShape->MakeRepel(theRes, + if (theShape->MakeTweak(tweak_mode_repel, theRes, mode == TWEAK_MODE_REPEL? force : -force, join_straight, 4.0, - true, p[NR::X], p[NR::Y], radius, &i2doc) == 0) + true, p, NR::Point(0,0), radius, &i2doc) == 0) did_this = true; } else if (mode == TWEAK_MODE_PUSH) { - if (theShape->MakePush(theRes, + if (theShape->MakeTweak(tweak_mode_push, theRes, + 0, join_straight, 4.0, true, p, force*2*vector, radius, &i2doc) == 0) did_this = true; } else if (mode == TWEAK_MODE_ROUGHEN) { - if (theShape->MakeJitter(theRes, + if (theShape->MakeTweak(tweak_mode_roughen, theRes, + force, join_straight, 4.0, - true, p, force, radius, &i2doc) == 0) + true, p, NR::Point(0,0), radius, &i2doc) == 0) did_this = true; } |
