Issue 121387 - mirrored picture is drawn to wrong position
Summary: mirrored picture is drawn to wrong position
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: PC Windows XP
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
Depends on:
Blocks: 121425
  Show dependency treegraph
Reported: 2012-11-22 15:26 UTC by Regina Henschel
Modified: 2013-07-12 16:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Original file (22.68 KB, application/vnd.oasis.opendocument.chart)
2012-11-22 15:26 UTC, Regina Henschel
no flags Details
File after mirroring (24.91 KB, application/vnd.oasis.opendocument.chart)
2012-11-22 15:26 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2012-11-22 15:26:07 UTC
Created attachment 79941 [details]
Original file

Steps to reproduce:
Start with a new Draw document.
Insert picture from file, embedding it.
Set picture line from invisible to e.g. red.
Mirror the picture over its diagonal.
Notice, that the line is mirrored correctly, but the picture is drawn on wrong position. You can refresh drawing (Ctrl-Shift-R) to get the whole drawing visible.

I'll attach the document before and after mirroring. It contains a blue rectangle to mark the original position and the picture itself.

The mirroring was OK in OOo3.2.1
Comment 1 Regina Henschel 2012-11-22 15:26:49 UTC
Created attachment 79942 [details]
File after mirroring
Comment 2 Armin Le Grand 2012-11-23 10:56:20 UTC
ALG: Clearly one for me, taking over (btw: all that transformation stuff will be much more reliable when aw080 will be done :-))...
Comment 3 Armin Le Grand 2012-11-27 17:36:36 UTC
ALG: Error is in GraphicManager; it seems to be not capable/to have an error when mirroring and rotation is mixed. This can be checked by forcing to the own renderer in vclprocessor2d.cxx ln 427 (true == bForceUseOfOwnTransformer). Taking a look at GraphicObject::Draw...
Comment 4 Armin Le Grand 2012-11-28 09:48:22 UTC
ALG: Has to do with fix of #118824# eventually. After fixing this I need to check that task, too.
Comment 5 Armin Le Grand 2012-11-28 12:19:07 UTC
ALG: Corrected RenderBitmapPrimitive2D_GraphicManager. Problem is that the transformation is completely correct, but extractiong the parameters for the aged GraphicObject::Draw command with the GraphicAttr parameter containing rotation and mirroring is cude. I needed to add another correction when mirroring and rotation are combined; the position of (pos/size) given to the :draw call needs to be adapted to old behaviour.
This works, also checked that #118824# is still fixed.
All in all the GraphicManager does not give a good quality on this kind of bitmap painting at all; thus I will check to also adapt default bitmap paint behaviour to the qualitatively better own bitmap transformer...
Comment 6 SVN Robot 2012-11-28 13:52:28 UTC
"alg" committed SVN revision 1414687 into trunk:
#121387# Corrected RenderBitmapPrimitive2D_GraphicManager to correctly handle...
Comment 7 Armin Le Grand 2012-11-28 14:39:20 UTC
Okay, done and comitted.
Comment 8 SVN Robot 2012-11-28 14:55:40 UTC
"alg" committed SVN revision 1414736 into trunk:
#121387# Corrected wrong flag usages in RenderPolygonHairlinePrimitive2D