List Info

Thread: Flake Resize




Flake Resize
user name
2007-02-22 11:07:11
Hello,

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:

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.

Thanks and Best Regards,

Fredy Yanardi

_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

  
Re: Flake Resize
user name
2007-02-23 12:30:55
This is/was mainly my area, so I guess I should answer.

And by all means please work on it. I havn't looked on the
patch (havn't got 
the time).

you say that resize don't work but iirc only combined with
shearing it has a 
problem.

Please make sure it also works when selecting multiple
shapes. That is 
really the hard part.

best regards
Casper Boemann

----- Original Message ----- 
From: "Fredy Yanardi" <fyanardigmail.com>
To: <koffice-develkde.org>
Sent: Thursday, February 22, 2007 6:07 PM
Subject: Flake Resize


> Hello,
>
> 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:
>
> 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.
>
> Thanks and Best Regards,
>
> Fredy Yanardi
>


------------------------------------------------------------
--------------------


> _______________________________________________
> koffice-devel mailing list
> koffice-develkde.org
> h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
> 
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

Re: Flake Resize
user name
2007-02-23 13:41:02
Hi Casper,

Unfortunately I also found that resize doesn't work for
mirrored shape (and of 
course any combinations of mirror). My patch fixes resize
for mirrored shape 
(and combination of mirror + rotate), and also fixes resize
for sheared 
shape. I haven't finished fixing resize for mirrored +
sheared, I was quite 
busy today. For selecting multiple shapes, I've fixed for
resize + mirror but 
somehow I messed the code with my later work so I'll check
again later. It's 
far from perfect, but it has fixed few issues.

Best Regards,

Fredy Yanardi

On Saturday 24 February 2007 02:30, Casper Boemann wrote:
> This is/was mainly my area, so I guess I should
answer.
>
> And by all means please work on it. I havn't looked on
the patch (havn't
> got the time).
>
> you say that resize don't work but iirc only combined
with shearing it has
> a problem.
>
> Please make sure it also works when selecting multiple
shapes. That is
> really the hard part.
>
> best regards
> Casper Boemann
>
> ----- Original Message -----
> From: "Fredy Yanardi" <fyanardigmail.com>
> To: <koffice-develkde.org>
> Sent: Thursday, February 22, 2007 6:07 PM
> Subject: Flake Resize
>
> > Hello,
> >
> > 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:
> >
> > 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.
> >
> > Thanks and Best Regards,
> >
> > Fredy Yanardi
>
>
------------------------------------------------------------
---------------
>-----
>
> > _______________________________________________
> > koffice-devel mailing list
> > koffice-develkde.org
> > h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
>
> _______________________________________________
> koffice-devel mailing list
> koffice-develkde.org
> h
ttps://mail.kde.org/mailman/listinfo/koffice-devel
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

Re: Flake Resize
country flaguser name
Germany
2007-02-24 00:34:23
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-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

Re: Flake Resize
user name
2007-02-25 05:47:37
On Saturday 24 February 2007 07:34, Thorsten Zachmann
wrote:
> 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?
shearing because it was never done 

scaling is iirc part of the "matrix" in the
equation

> 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.
Again I never got that far, but each of these commands
should remember all 
properties as you cannot seperate them.

I though I'd made a rotate command though.

> 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.
We definitely want to rotate (and shear and scale) the
bounding boxes. Direct 
manipulation and feedback rules 
-- 
best regards / venlig hilsen
Casper Boemann
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )