Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::Display::TemporaryItem * SPDesktop::add_temporary_canvasitem ( SPCanvasItem item,
guint  lifetime,
bool  move_to_bottom = true 

Note that lifetime is measured in milliseconds One should *not* keep a reference to the SPCanvasItem, the temporary item code will delete the object for you and the reference will become invalid without you knowing it. It is perfectly safe to ignore the returned pointer: the object is deleted by itself, so don't delete it elsewhere! The *only* valid use of the returned TemporaryItem* is as argument for SPDesktop::remove_temporary_canvasitem, because the object might be deleted already without you knowing it. move_to_bottom = true by default so the item does not interfere with handling of other items on the canvas like nodes.

Definition at line 423 of file desktop.cpp.

    if (move_to_bottom) {
        sp_canvas_item_move_to_z(item, 0);

    return temporary_item_list->add_item(item, lifetime);

Generated by  Doxygen 1.6.0   Back to index