• Dmitry Kazakov's avatar
    Implement KoShape::updateAbsolute() for complex transformation updates · 6f51599f
    Dmitry Kazakov authored
    Historically, transformation code uses extremely weird method of shape
    updates that rely on the event loop. This patch implements a framework
    for moving away from this strategy.
    The problem:
    When one transforms a shape he needs to update both areas: bounding
    rect of the shape *before* the transform and a bounding rect of the shape
    *after* the transform. Before the patch, the transformation code used the
    system like that:
    That works only with assumption that the first update() call will *not*
    be executed before setTransform() call. That should be true atm, but it
    is not guaranteed to be so in the future. Therefore, now the update happens
    like that:
    const QRectF oldDirtyRect = shape->boundingRect();
    shape->updateAbsolute(oldDirtyRect | shape->boundingRect());
SimpleRootAreaProvider.cpp 7.12 KB