void FilterTile::area_enlarge(Geom::IntRect &area, Geom::Affine const &trans)
{
    // We need to enlarge enough to get tile source... we don't the area of the source tile in this
    // function so we guess. This is VERY inefficient.
    Geom::Point enlarge(200, 200);
    enlarge *= trans;
    area.expandBy( enlarge[Geom::X] < 100 ? 100: enlarge[Geom::X] );
}
예제 #2
0
static void
sp_canvas_arena_viewbox_changed (SPCanvasItem *item, Geom::IntRect const &new_area)
{
    SPCanvasArena *arena = SP_CANVAS_ARENA(item);
    // make the cache limit larger than screen to facilitate smooth scrolling
    Geom::IntRect expanded = new_area;
    Geom::IntPoint expansion(new_area.width()/2, new_area.height()/2);
    expanded.expandBy(expansion);
    arena->drawing.setCacheLimit(expanded);
}