[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Flake Resize
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2007-02-24 6:34:23
Message-ID: 200702240734.23520.t.zachmann () zagge ! de
[Download RAW message or body]

Hello Fredy,

> Currently combined actions for flake are mostly broken (resize only works
> if the shape is not sheared, rotated, mirrored, etc). For few days I've
> been working to fix that. I haven't fixed all issues yet, but what I've
> done so far can be summarized here:

Good to hear that someone is working on that. 

> Mirror:
> o Mirror + resize : OK
> o Mirror + rotate : OK
> o Mirror + rotate + resize : OK
>
> Shear
> o shear + resize : OK
> o shear + rotate : OK
> o shear + rotate + resize : OK
> o shear + mirror: OK
> o shear + mirror + resize : partially works
> o shear + mirror + rotate : ---
> o shear + mirror + resize + rotate : ---
>
> o Scale From Center doesn't work correctly (haven't looked at that yet)
>
> Also, currently resizing doesn't change shearX or/and shearY components.
> From my observation, in Karbon 1.6, Inkscape, and OpenOffice.org Draw,
> resize also resizes the shear components (the shearX / shearY also become
> zoomed in / out). Which behaviour do we expect from flake? Zooming the
> shear components or just leave the shear components unchanged?
>
> Here I also attach a patch for what I've done so far. Shall I continue to
> work on this? I was working on revision 635012.

I have tested your patch and found some problems:

If you select more than one shape and resize them all they are resized by a 
different value. This can be easily seen when you use 2 ore more rects of the 
same size.

Also the move of

        keepAspect = keepAspect || shape->keepAspectRatio();

to the shape loop will only keep the aspect of the shapes after the first 
shape has this property set. Before it is kept for all shapes when one shape 
has it set. 

I think the solution to the problem might be not so hard. I might be wrong 
here but I think the following code from the original code is to blame:

        // construct the matrix tranformation we apply to the shape
        QMatrix m = (QMatrix().rotate(shape->rotation())) * matrix  * 
(QMatrix().rotate(-shape->rotation()));

Why is only the rotation taken into account but not the shearing/skaling? 
Maybe Casper can tell us more? 

Also one think I noticed is that most commands cannot be undone as. This is 
due to only having a KoShapeMoveCommand and a KoShapeSizeCommand but no 
commands for all the other properties that have changed.

One more question. Do we want to rotate the bounding box with the shapes if 
there is more then one shape selected? I think most operations work quite 
well (not perfect) if you reselect the shapes after e.g. a rotation.

Have a nice day,

Thorsten
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic