summaryrefslogtreecommitdiffstats
path: root/src/tweak-context.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-01-12 03:49:27 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-01-12 03:49:27 +0000
commitc2790b4c3d0e7d740f1c6551062dcc78b65d782d (patch)
tree570983710098ebf82f6be0b6cb9635de5d6452ad /src/tweak-context.cpp
parentfix over_the_stroke for paths in transformed groups (diff)
downloadinkscape-c2790b4c3d0e7d740f1c6551062dcc78b65d782d.tar.gz
inkscape-c2790b4c3d0e7d740f1c6551062dcc78b65d782d.zip
fix vector, power, and fidelity for paths in transformed groups, also normalize fidelity for zoom level (still not ideal for very small paths at 256x zoom, I suspect livarot just lacks precision)
(bzr r4469)
Diffstat (limited to 'src/tweak-context.cpp')
-rw-r--r--src/tweak-context.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index 736ebf2eb..a70ae49d3 100644
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
@@ -390,8 +390,9 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
Shape *theShape = new Shape;
Shape *theRes = new Shape;
+ NR::Matrix i2doc(sp_item_i2doc_affine(item));
- orig->ConvertWithBackData(0.08 - (0.07 * fidelity)); // default 0.059
+ orig->ConvertWithBackData((0.08 - (0.07 * fidelity)) / i2doc.expansion()); // default 0.059
orig->Fill(theShape, 0);
SPCSSAttr *css = sp_repr_css_attr(SP_OBJECT_REPR(item), "style");
@@ -413,7 +414,6 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
vector = 1/NR::L2(vector) * vector;
bool did_this = false;
- NR::Matrix i2doc(sp_item_i2doc_affine(item));
if (mode == TWEAK_MODE_SHRINK || mode == TWEAK_MODE_GROW) {
if (theShape->MakeTweak(tweak_mode_grow, theRes,
mode == TWEAK_MODE_GROW? force : -force,
@@ -428,7 +428,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
did_this = true;
} else if (mode == TWEAK_MODE_PUSH) {
if (theShape->MakeTweak(tweak_mode_push, theRes,
- 0,
+ 1.0,
join_straight, 4.0,
true, p, force*2*vector, radius, &i2doc) == 0)
did_this = true;
@@ -447,10 +447,10 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
res->Reset();
theRes->ConvertToForme(res);
- double th_max = 0.6 - 0.59*sqrt(fidelity);
+ double th_max = (0.6 - 0.59*sqrt(fidelity)) / i2doc.expansion();
double threshold = MAX(th_max, th_max*force);
res->ConvertEvenLines(threshold);
- res->Simplify(threshold);
+ res->Simplify(threshold / (SP_ACTIVE_DESKTOP->current_zoom()));
if (newrepr) { // converting to path, need to replace the repr
bool is_selected = selection->includes(item);