Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_canvas_item_lower ( SPCanvasItem item,
int  positions 
)

Lowers the item in its parent's stack by the specified number of positions.

Parameters:
item A canvas item.
positions Number of steps to lower the item.
If the number of positions is greater than the distance to the bottom of the stack, then the item is put at the bottom.

Definition at line 454 of file sp-canvas.cpp.

{
    g_return_if_fail (item != NULL);
    g_return_if_fail (SP_IS_CANVAS_ITEM (item));
    g_return_if_fail (positions >= 1);

    if (!item->parent || positions == 0)
        return;

    SPCanvasGroup *parent = SP_CANVAS_GROUP (item->parent);
    GList *link = g_list_find (parent->items, item);
    g_assert (link != NULL);

    GList *before;
    if (link->prev)
        for (before = link->prev; positions && before; positions--)
            before = before->prev;
    else
        before = NULL;

    put_item_after (link, before);

    redraw_if_visible (item);
    item->canvas->need_repick = TRUE;
}


Generated by  Doxygen 1.6.0   Back to index