~ubuntu-branches/ubuntu/utopic/inkscape/utopic-proposed

« back to all changes in this revision

Viewing changes to src/live_effects/lpe-bendpath.cpp

  • Committer: Package Import Robot
  • Author(s): Alex Valavanis
  • Date: 2014-08-19 19:10:32 UTC
  • mfrom: (1.6.5) (2.5.14 sid)
  • Revision ID: package-import@ubuntu.com-20140819191032-2eca1qihaszjk9i6
Tags: 0.48.5-2ubuntu1
* Merge with Debian Unstable (LP: #1358863). Fixes several Ubuntu bugs:
  - Illustrator CS SVG won't load: namespace URIs in entities (LP: #166371)
  - inkscape crashed with SIGSEGV in
    sp_dtw_color_profile_event() (LP: #966441)
  - inkscape crashed with SIGSEGV (LP: #1051017)
  - inkscape crashed with SIGSEGV in Inkscape::Preferences::_getNode()
    (LP: #1163241)
  - save a copy reverts to save as (LP: #529843)
  - Extension to braille not working on Xubuntu 12.10 (LP: #1090865)
* Remaining changes:
  - debian/control:
    + Set Ubuntu Developer as maintainer,
    + build-depend on dh-translation to handle Ubuntu translation,
    + demote pstoedit from Recommends to Suggests (because it's in universe),
  - debian/patches/0006_add_unity_quicklist_support.patch: add.
  - debian/patches/series: update.
  - debian/rules:
    + add dh_translation to handle Ubuntu translation
* Drop debian/patches/librevenge.patch (superseded by
    debian/patches/0006-Update_to_new_libwpg.patch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
        bend_path.changed = false;
97
97
    }
98
98
 
 
99
    if (uskeleton.empty()) {
 
100
        return pwd2_in;  /// \todo or throw an exception instead? might be better to throw an exception so that the UI can display an error message or smth
 
101
    }
 
102
 
99
103
    D2<Piecewise<SBasis> > patternd2 = make_cuts_independent(pwd2_in);
100
104
    Piecewise<SBasis> x = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[1]) : Piecewise<SBasis>(patternd2[0]);
101
105
    Piecewise<SBasis> y = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[0]) : Piecewise<SBasis>(patternd2[1]);
107
111
    x-= bboxHorizontal.min();
108
112
    y-= bboxVertical.middle();
109
113
 
110
 
  double scaling = uskeleton.cuts.back()/bboxHorizontal.extent();
 
114
    double scaling = uskeleton.cuts.back()/bboxHorizontal.extent();
111
115
 
112
 
  if (scaling != 1.0) {
 
116
    if (scaling != 1.0) {
113
117
        x*=scaling;
114
118
    }
115
119
 
119
123
        if (prop_scale != 1.0) y *= prop_scale;
120
124
    }
121
125
 
122
 
 
123
126
    Piecewise<D2<SBasis> > output = compose(uskeleton,x) + y*compose(n,x);
124
127
    return output;
125
128
}