diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-07-07 15:45:42 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-07-07 15:45:42 +0000 |
| commit | 486777088fb307d401e0c2f80a5157702a282849 (patch) | |
| tree | 0149f99f5bd0d673ad63a0b27ce237e02855cb30 /src/pencil-context.cpp | |
| parent | fix number of marker counting in shape (diff) | |
| download | inkscape-486777088fb307d401e0c2f80a5157702a282849.tar.gz inkscape-486777088fb307d401e0c2f80a5157702a282849.zip | |
2geomify more of pencil-context.cpp
(bzr r6209)
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 918990e7e..5b06770e4 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -634,12 +634,11 @@ fit_and_split(SPPencilContext *pc) /* Set up direction of next curve. */ { - NArtBpath const &last_seg = *pc->red_curve->last_bpath(); - pc->p[0] = last_seg.c(3); + Geom::CubicBezier const * last_seg = dynamic_cast<Geom::CubicBezier const *>(pc->red_curve->last_segment()); + g_assert( last_seg ); // Relevance: validity of (*last_seg)[2] + pc->p[0] = last_seg->finalPoint(); pc->npoints = 1; - g_assert( last_seg.code == NR_CURVETO ); - /* Relevance: validity of last_seg.c(2). */ - NR::Point const req_vec( pc->p[0] - last_seg.c(2) ); + NR::Point const req_vec( pc->p[0] - (*last_seg)[2] ); pc->req_tangent = ( ( NR::is_zero(req_vec) || !in_svg_plane(req_vec) ) ? NR::Point(0, 0) : NR::unit_vector(req_vec) ); |
