diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-12-23 21:36:31 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-12-23 21:36:31 +0000 |
| commit | 56816e1d347b8850b138616f805363abcbdfd234 (patch) | |
| tree | ba6214c7e37ea8bbf54f6d774482c60fb4e45edc | |
| parent | update to latest 2geom, bugs be gone! (diff) | |
| download | inkscape-56816e1d347b8850b138616f805363abcbdfd234.tar.gz inkscape-56816e1d347b8850b138616f805363abcbdfd234.zip | |
2geom update
(bzr r4286)
| -rw-r--r-- | src/2geom/d2-sbasis.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/2geom/d2-sbasis.cpp b/src/2geom/d2-sbasis.cpp index c5c005c24..8cf24627e 100644 --- a/src/2geom/d2-sbasis.cpp +++ b/src/2geom/d2-sbasis.cpp @@ -147,8 +147,19 @@ Piecewise<D2<SBasis> > force_continuity(Piecewise<D2<SBasis> > const &f, if (tol<=0 || L2sq(pt0-pt1)<tol*tol){ pt0 = (pt0+pt1)/2; for (unsigned dim=0; dim<2; dim++){ - result.segs[prev][dim][0][1]=pt0[dim]; - result.segs[cur ][dim][0][0]=pt0[dim]; + SBasis &prev_sb=result.segs[prev][dim]; + SBasis &cur_sb =result.segs[cur][dim]; + Coord const c=pt0[dim]; + if (prev_sb.empty()) { + prev_sb.push_back(Linear(0.0, c)); + } else { + prev_sb[0][1] = c; + } + if (cur_sb.empty()) { + cur_sb.push_back(Linear(c, 0.0)); + } else { + cur_sb[0][0] = c; + } } } prev = cur++; |
