Logo Search packages:      
Sourcecode: inkscape version File versions

void GrDrag::addLine ( NR::Point  p1,
NR::Point  p2,
guint32  rgba 
)

Create a line from p1 to p2 and add it to the lines list

Definition at line 880 of file gradient-drag.cpp.

References sp_canvas_item_new(), and sp_canvas_item_show().

Referenced by updateLines().

{
    SPCanvasItem *line = sp_canvas_item_new(sp_desktop_controls(this->desktop),
                                                            SP_TYPE_CTRLLINE, NULL);
    sp_ctrlline_set_coords(SP_CTRLLINE(line), p1, p2);
    if (rgba != GR_LINE_COLOR_FILL) // fill is the default, so don't set color for it to speed up redraw
        sp_ctrlline_set_rgba32 (SP_CTRLLINE(line), rgba);
    sp_canvas_item_show (line);
    this->lines = g_slist_append (this->lines, line);
}


Generated by  Doxygen 1.6.0   Back to index