1. 16 Jun, 2017 1 commit
    • 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:
      
      shape->update();
      shape->setTransformation(newTransform);
      shape->update();
      
      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->setTransformation(newTransform);
      shape->updateAbsolute(oldDirtyRect | shape->boundingRect());
      6f51599f
  2. 30 Dec, 2016 2 commits
    • Dmitry Kazakov's avatar
    • Dmitry Kazakov's avatar
      Implement global scaling mode · 22edd167
      Dmitry Kazakov authored
      In Global Scaling Mode the spin boxes in the geometry box
      measure the size of your shape in *absolute* coordinates, that is
      in X,Y coordinates of your image. That way you can find out the
      bounding box of the heavily transformed shapes.
      
      Global Scaling Mode can also be combined with "non-uniform scaling"
      mode. It this case, changing width or height of the shapes will keep the
      geometry of the shape(!), that is will not add any shears to the rotated
      shapes. If you combine Global Scaling Mode and Uniform Scaling, then
      scaling rotated shapes will shear during the transformation.
      
      PS:
      I feel these options will need quite a bit of video
      documentation/explanation!
      
      CC:kimageshop@kde.org
      22edd167
  3. 29 Dec, 2016 1 commit