Issue 123950 - Visible area of cropped raster graphic (bitmap) changes when rotating
Summary: Visible area of cropped raster graphic (bitmap) changes when rotating
Alias: None
Product: Draw
Classification: Application
Component: editing (show other issues)
Version: 3.4.0
Hardware: PC Windows 7
: P3 Major (vote)
Target Milestone: 4.1.0
Assignee: Armin Le Grand
QA Contact: zhaoshzh
Keywords: regression
Depends on:
Reported: 2014-01-02 16:39 UTC by Rainer Bielefeld
Modified: 2017-05-20 10:35 UTC (History)
7 users (show)

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

Sample Document with Screenshot (41.57 KB, application/
2014-01-02 16:39 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2014-01-02 16:39:10 UTC
Created attachment 82201 [details]
Sample Document with Screenshot

Steps how to reproduce with "AOO 4.0.1   – German UI / German locale  [Rev. 1524958 2013-09-20 11:40:29]" on  German WIN7 Home Premium (64bit)", “historic”  4.0  User Profile used for all  predecessor versions:

1. Open attached Sample document from AOO Start Center
2. In first slide select "Original Picture Cropped"
   > Control points appear
3. Menu 'Modify -> Rotate'
   > Rotate handles appear
4. Move mouse pointer to top right corner rotation control handle
   > Mouse pointer view chantes to "rotation"
5. To a 360° rotation counter clockwise and watch what happens
   Expected: Visible area of original shape stays the same all time, none 
             of the colored margins will appear
   Actual: Borders appear, visible area changes.                           :-(

Additional Info:
(a) Already reproducible with server installation of  "AOO 3.4.0 – German UI / 
    German locale [AOO340m1(Build:9590) - Rev.1327774]" on German WIN7 Home 
    Premium (64bit)", own separate user profile
(b) Was still ok with  sever installation of "OOo 3.3.0 English UI / 
    German locale [OOO330m20 (Build 9567)]" on  WIN7  Home Premium  (64bit) DE 
(c) also a Problem with LibO 4.1.3
(d) but was still ok with LibO 3.3.3
(e) If you want to do quick tests you only need to watch the 2 rotated 
    pictures "Picture Cropped 45°" and "Picture Cropped 90°", if green or
    blue margin is visible the version is affected.
(e) General problem what I see with many of my Drawing Documents.
(f) It does not matter whether I crop using crop handles or crop dialog
Comment 1 Rainer Bielefeld 2014-01-02 16:48:05 UTC
(g) Still Reproducible with server installation of "AOO 4.1.0-Dev – English  UI / English locale - [AOO410m1(Build:9750)  -  Rev. 1554205 - 2014-01-01]" on German WIN7 Home Premium (64bit)", own separate user profile.
Comment 2 Edwin Sharp 2014-01-02 16:50:41 UTC
Confirmed with
AOO410m1(Build:9750)  -  Rev. 1552994
Win 7
Comment 3 Regina Henschel 2014-01-03 00:17:12 UTC
That are likely the same problems as in bug 94090.
Comment 4 Rainer Bielefeld 2014-01-03 04:46:05 UTC
(In reply to Regina Henschel from comment #3)
I checked that report, simply was not sure whether I understood all details of Bug 94090 ... 

And version of appearance does not match, this one appeared with AOO 3.4, but Bug 94090 already appeared in the 300 code line
Comment 5 Armin Le Grand 2014-01-22 20:43:26 UTC
This is a known error and is like that since cropping was implemented. The ones doing it just ignored or did not know that graphic objects can be rotated. I have this in my focus to fix it, but it is no regression.
Comment 6 Armin Le Grand 2014-01-22 21:55:28 UTC
I implemented the visible preview of cropped parts for AOO400, that part works already. I can check how much work it would be...
Comment 7 Armin Le Grand 2014-01-23 02:10:52 UTC
Redefined the CropPrimitive2D::get2DDecomposition implementation to make it shear and rotation independent. Could even simplify it by unifications and doing the needed manipulations in unit coordiante system, so that no care has to be taken if the cropped content is mirrored, sheared or scaled at all. Committing that part which corrects the visualization.
Comment 8 SVN Robot 2014-01-23 02:12:43 UTC
"alg" committed SVN revision 1560574 into trunk:
i123950 unified and redefined CropPrimitive2D::get2DDecomposition
Comment 9 Armin Le Grand 2014-01-23 02:13:12 UTC
Okay, done. Lets see what can be done with the UI interaction handling tomorrow...
Comment 10 Armin Le Grand 2014-01-23 13:44:06 UTC
Just checked to make sure in a AOO401 (AOO401m5(Build:9714)  -  Rev. 1524958
2013-09-20 11:40:29 (Fr, 20 Sep 2013)) to check if the visualization worked - it did not, as I had in my mind. Still, this should work once, so I will check for how much the UI stuff is. It seems as if the 'point mode' would be preferable for adding the crop handles there, currently the object mode is used. Point mode is better or single-selection (what crop is anyways). The basic interactions (move handles just in directions aligned to the sheared/rotated object) are already there.
Comment 11 Armin Le Grand 2014-01-23 13:51:09 UTC
Checked in AOO3.4, same error
Checked with OOo3.3, same error (even crashed once and no shear for graphic objects)
Checked with OOo3.2, same error (no shear)
Checked with OOo2.2, same error, crop gets lost on paste, no crop UI, no shear
Comment 12 Armin Le Grand 2014-01-24 21:54:06 UTC
Pretty far, about to add roated handles (the bitmaps). Had to make more changes as expected, but thats how it always is...
Comment 13 Armin Le Grand 2014-01-24 23:35:54 UTC
Made shear work (core has shear wrong defined, need to correct when using with homogen matrices), made handles rotated and sheared if needed, mirroring (following old definitions, all already change din aw080) in the works...
Comment 14 Armin Le Grand 2014-01-27 17:12:10 UTC
Needed a lot of fine tuning with the old core model definitions, would have been much easier with aw080 where the mirrorings are real mirrorings defined in the objects transformation. Works now, but will need the same fine tuning again in aw080.
GraphicObjects can now be cropped in any state, if mirrored, sheared or rotated. The preview of the cropped part will work in any state, too. This makes the feature of interactive cropping fully working and implemented for the first time. Preparing commit...
Comment 15 SVN Robot 2014-01-27 17:14:55 UTC
"alg" committed SVN revision 1561756 into trunk:
i123950 Corrected/extended interactive crop feature to work in all situations
Comment 16 Armin Le Grand 2014-01-27 17:16:02 UTC
Comitted, done.
Comment 17 Armin Le Grand 2014-01-27 21:15:33 UTC
Changed state and owner
Comment 18 zhaoshzh 2014-02-27 03:10:33 UTC
verified on AOO410m1(build:9750) - rev:1566593
Comment 19 fanyuzhen 2014-02-27 08:44:08 UTC
Change status per Shao Zhi Zhao's verification