Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

static void spdc_pen_finish_segment ( SPPenContext pc,
Geom::Point  p,
guint  state 
) [static]

Todo:
fixme:

Definition at line 1335 of file pen-context.cpp.

References SPCurve::append_continuous(), SPCurve::copy(), SPCurve::is_empty(), SPPenContext::npoints, SPCurve::reset(), and SPCurve::unref().

Referenced by pen_handle_button_press(), and pen_handle_button_release().

{
    if (pc->polylines_paraxial) {
        pen_last_paraxial_dir = pen_next_paraxial_direction(pc, p, pc->p[0], state);
    }

    ++pc->num_clicks;

    if (!pc->red_curve->is_empty()) {
        pc->green_curve->append_continuous(pc->red_curve, 0.0625);
        SPCurve *curve = pc->red_curve->copy();
        /// \todo fixme:
        SPCanvasItem *cshape = sp_canvas_bpath_new(sp_desktop_sketch(pc->desktop), curve);
        curve->unref();
        sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(cshape), pc->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);

        pc->green_bpaths = g_slist_prepend(pc->green_bpaths, cshape);

        pc->p[0] = pc->p[3];
        pc->p[1] = pc->p[4];
        pc->npoints = 2;

        pc->red_curve->reset();
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index