Bug 227512 - Scaling this .kra image moves vector objects incorrectly
Summary: Scaling this .kra image moves vector objects incorrectly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Adam C
URL:
Keywords: release_blocker
: 219766 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-18 12:54 UTC by Kubuntiac
Modified: 2010-09-14 12:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kubuntiac 2010-02-18 12:54:55 UTC
Version:            (using KDE 4.4.0)
OS:                Linux
Installed from:    Ubuntu Packages

STEPS TO REPRODUCE:
1. Download and open http://krita.org/images/bugs/amarok-splash.kra
2. Image -> Scale to New Size
3. Set width to 598 and click ok.
4. Vector shapes seem to be the correct scale, but misplaced.

See before (above) and after (below) image at:
http://img188.imageshack.us/img188/4864/beforeandafterq.png
Comment 1 Elián Hanisch 2010-02-28 01:50:44 UTC
I downloaded the kra file but it didn't have any shapes on it :/

I tested adding some shapes myself, and scaling looked alright.
So seems fixed now, can you test again with latest trunk?
Comment 2 Halla Rempt 2010-03-02 09:33:16 UTC
*** Bug 219766 has been marked as a duplicate of this bug. ***
Comment 3 Sven Langkamp 2010-03-16 03:05:01 UTC
There is a problem with grouped shapes. Non-grouped shapes are scaled fine.
Comment 4 Adam C 2010-09-02 03:46:54 UTC
fix on reviewboard
Comment 5 Adam C 2010-09-04 14:14:49 UTC
SVN commit 1171560 by adamc:

o) fix scaling of shapes
o) fix ungrouping of scaled shapes
o) add unit test for both

BUG: 227512


 M  +2 -0      KoShape.cpp  
 M  +24 -0     commands/KoShapeGroupCommand.cpp  
 M  +72 -0     tests/TestShapeContainer.cpp  
 M  +1 -0      tests/TestShapeContainer.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1171560
Comment 6 Adam C 2010-09-13 16:43:05 UTC
we need to find a new way for fixing, as the change to koshape is wrong.
Comment 7 Adam C 2010-09-14 12:15:43 UTC
SVN commit 1175147 by adamc:

o a shape group has no size, so return QSizeF(0,0)
- adjusted TestShapeGroupCommand. also some positions changed due to the
  due to the way, they are computed. absolutePositions of shapes are the
  same.
- added a test for scaling a group. with group size 0,0 it doesn't fail
o fixed a bug when ungrouping a shape
- we have to do the same calculation as in
  KoShape::absoluteTransformation
- added a test for this
o added comment in KisShapeLayer::transform, that krtia doesn't support
  inheriting transformations. currently no krita enabled shape uses
  this.

BUG: 227512


 M  +5 -0      krita/ui/flake/kis_shape_layer.cc  
 M  +5 -0      libs/flake/KoShapeGroup.cpp  
 M  +2 -0      libs/flake/KoShapeGroup.h  
 M  +19 -1     libs/flake/commands/KoShapeGroupCommand.cpp  
 M  +64 -0     libs/flake/tests/TestShapeContainer.cpp  
 M  +1 -0      libs/flake/tests/TestShapeContainer.h  
 M  +9 -16     libs/flake/tests/TestShapeGroupCommand.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1175147