Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_canvas_request_redraw ( SPCanvas canvas,
int  x0,
int  y0,
int  x1,
int  y1 

Forces redraw of rectangular canvas area.

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

References add_idle(), SPCanvas::x0, and SPCanvas::y0.

Referenced by redraw_if_visible(), sp_canvas_expose(), sp_canvas_item_hide(), sp_canvas_item_show(), and sp_canvas_size_allocate().

    NRRectL bbox;
    NRRectL visible;
    NRRectL clip;

    g_return_if_fail (canvas != NULL);
    g_return_if_fail (SP_IS_CANVAS (canvas));

    if (!GTK_WIDGET_DRAWABLE (canvas)) return;
    if ((x0 >= x1) || (y0 >= y1)) return;

    bbox.x0 = x0;
    bbox.y0 = y0;
    bbox.x1 = x1;
    bbox.y1 = y1;

    visible.x0 = canvas->x0;
    visible.y0 = canvas->y0;
    visible.x1 = visible.x0 + GTK_WIDGET (canvas)->allocation.width;
    visible.y1 = visible.y0 + GTK_WIDGET (canvas)->allocation.height;

    nr_rect_l_intersect (&clip, &bbox, &visible);

    sp_canvas_dirty_rect(canvas, clip.x0, clip.y0, clip.x1, clip.y1);
    add_idle (canvas);

Generated by  Doxygen 1.6.0   Back to index