Exemple #1
0
void
Bitmap::add_invalidated_bounds(InvalidatedRanges& ranges, bool force)
{
    if (!force && !invalidated()) return;

    ranges.add(m_old_invalidated_ranges);

    SWFRect bounds;
    bounds.expand_to_transformed_rect(getWorldMatrix(*this), getBounds()); 
    ranges.add(bounds.getRange());

}
Exemple #2
0
void
Video::add_invalidated_bounds(InvalidatedRanges& ranges, bool force)
{
    if (!force && !invalidated()) return; // no need to redraw

    ranges.add(m_old_invalidated_ranges);

    assert(m_def);

    SWFRect bounds;
    bounds.expand_to_transformed_rect(getWorldMatrix(*this), m_def->bounds());

    ranges.add(bounds.getRange());
}
Exemple #3
0
void 
qwidget::paintEvent(QPaintEvent *event)
{
    const QRegion& region = event->region();
    QRect rect = region.boundingRect();

    int xmin = static_cast<int> (pixelsToTwips(rect.x()-1)),
        ymin = static_cast<int> (pixelsToTwips(rect.y()-1)),
        xmax = static_cast<int> (pixelsToTwips(rect.right()+1)),
        ymax = static_cast<int> (pixelsToTwips(rect.bottom()+1));

    geometry::Range2d<int> range(xmin, ymin, xmax, ymax);
    InvalidatedRanges ranges;
    ranges.add(range);

    
    _godfather->setInvalidatedRegions(ranges);
    _godfather->renderBuffer();
}