Skip to content
  • Marc Pegon's avatar
    Corrected a small bug in transform worker with shearing. · 706493aa
    Marc Pegon authored
    Added constraints to the transformations :
    - Hold shift while rotating by steps of 15°
    - Hold shift while scaling to keep aspect ratio
    - Hold shift while moving selection to move along X or Y "global" axis only. Hold shift+ctrl to move along X or Y "object" axis only.
    - Hold shift while moving rotation center to move it along X or Y "local" axis only. Hold shift+ctrl to move it along X or Y "global" axis only.
    
    Did some work on the ui of the transform tool :
    - added small buttons to set rotation Center to th four corners/ middle of sides / center.
    - added spinboxes to show/modify current arguments of the transformation, with an aspect button for scale factors to keep aspect ratio
    
    Changed the general behaviour of the tool : Now QImages are used to display the temporary transformed selected pixels (drawn with some alpha to show that it's temporary),
    with an "Apply" button to apply eventually the transformation to the selected pixels, and "Reset" button to cancel the current transformation (preview goes back to original
    selection). Original selected pixels are kept the same and still drawn until the transformation has been applied, but to show that it is being modified, I darken it using a
     black QImage with alpha. Please tell me if you find it unclear or have a better idea (personally i think it's just fine).
    
    In the process, undo/redo actions have been broken, but I restored it then.
    Now we have 2 different commands : basic transform (which changes the preview only),  and apply transform (which changes the paintDevice).
    
    Please report any bug/anormal behaviour you may encounter with undo/redo or the transform tool itself.
    
    
    svn path=/trunk/koffice/; revision=1145719
    706493aa