Logo Search packages:      
Sourcecode: inkscape version File versions

static int do_update ( SPCanvas canvas  )  [static]

Helper that invokes update, paint, and repick on canvas.

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

References Geom::identity(), SPCanvas::need_repick, SPCanvas::need_update, paint(), pick_current_item(), SPCanvas::pick_event, SPCanvas::pixmap_gc, SPCanvas::root, and sp_canvas_item_invoke_update().

Referenced by idle_handler(), and sp_canvas_update_now().

{
    if (!canvas->root || !canvas->pixmap_gc) // canvas may have already be destroyed by closing desktop durring interrupted display!
        return TRUE;

    /* Cause the update if necessary */
    if (canvas->need_update) {
        sp_canvas_item_invoke_update (canvas->root, Geom::identity(), 0);
        canvas->need_update = FALSE;
    }

    /* Paint if able to */
    if (GTK_WIDGET_DRAWABLE (canvas)) {
            return paint (canvas);
    }

    /* Pick new current item */
    while (canvas->need_repick) {
        canvas->need_repick = FALSE;
        pick_current_item (canvas, &canvas->pick_event);
    }

    return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index