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

void sp_canvas_item_hide ( SPCanvasItem item  ) 

Clears visible flag on item and requests a redraw.

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

References SPCanvasItem::canvas, SPCanvas::need_repick, sp_canvas_request_redraw(), SPCanvasItem::x1, SPCanvasItem::x2, SPCanvasItem::y1, and SPCanvasItem::y2.

Referenced by _namedview_modified(), Inkscape::UI::PathManipulator::_updateOutline(), Inkscape::UI::Handle::setVisible(), Inkscape::UI::ControlPoint::setVisible(), sp_knot_set_flag(), and sp_pen_context_setup().

{
    g_return_if_fail (item != NULL);
    g_return_if_fail (SP_IS_CANVAS_ITEM (item));

    if (!(item->flags & SP_CANVAS_ITEM_VISIBLE))
        return;

    item->flags &= ~SP_CANVAS_ITEM_VISIBLE;

    int x0 = (int)(item->x1);
    int x1 = (int)(item->x2);
    int y0 = (int)(item->y1);
    int y1 = (int)(item->y2);

    if (x0 !=0 || x1 !=0 || y0 !=0 || y1 !=0) {
        sp_canvas_request_redraw (item->canvas, (int)item->x1, (int)item->y1, (int)(item->x2 + 1), (int)(item->y2 + 1));
        item->canvas->need_repick = TRUE;
    }
}


Generated by  Doxygen 1.6.0   Back to index