• Jan Hambrecht's avatar
    Changed api for transformation related methods in KoShape. · c0983937
    Jan Hambrecht authored
    When doing shape transformations one has to know that there
    are two coordinate systems involved. The first one is the
    global (absolute) coordinates system, the one that corresponds
    to the document. The second is the local coordinates system
    that is only relevant to a single shape. To distinguish on
    which coordinate system a methods works, there is the
    "absolute" prefix for the methods dealing with the global,
    document based coordinate system.
    
    methods working relative to the globale coordinate system:
    
    absolutePosition()
    setAbsolutePsotion()
    absoluteTransformation() -> was transformationMatrix before
    applyAbsoluteTransformation() -> was applyTransformation()
    
    methods working relative to the shape coordinate system:
    
    position()
    setPosition()
    rotate()
    setShear()
    setScale()
    transformation()
    setTransformation()
    applyTransformation()
    
    Additionally i removed the moveBy methods which used to
    be relative to the global coordinate system. I removed
    that one as one can simply type
    setAbsolutePosition( absolutePosition() + QPoinF(dx,dy) )
    to have the same effect as before.
    
    I hope that makes it easier to use transformation of
    shapes.
    
    
    svn path=/trunk/koffice/; revision=700574
    c0983937
KoShape.cpp 29.7 KB