From: johanengelen Date: Mon, 7 Jul 2008 15:45:42 +0000 (+0000) Subject: 2geomify more of pencil-context.cpp X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b306627bcbcab5bbee2cc1d88222810f869ebcc7;p=inkscape.git 2geomify more of pencil-context.cpp --- 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(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) );