Issue 120642 - square gradient has not enough steps
Summary: square gradient has not enough steps
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 17:14 UTC by Regina Henschel
Modified: 2022-10-28 12:54 UTC (History)
0 users

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


Attachments
document with square gradient applied to square and rectangle (15.91 KB, application/vnd.oasis.opendocument.presentation)
2012-08-21 17:14 UTC, Regina Henschel
no flags Details
square target using maximum edge not diagonal (1.41 KB, patch)
2012-09-01 21:05 UTC, Regina Henschel
no flags Details | Diff
zip with original files and "History", a collection of screenshots (116.45 KB, application/zip)
2012-09-04 16:34 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-08-21 17:14:37 UTC
Created attachment 79039 [details]
document with square gradient applied to square and rectangle

I use a debug build of trunk r1374948 on WinXP.
Open the attached filed. The gradient is defined from yellow to green. If it is applied to a square the outer yellowish parts are missing. Using a small step count shows, that there are not enough steps.

The second slide has a screenshot of how it looks for me.

In presentation mode the yellow parts are shown for the small step counts but not for step count automatic.
Comment 1 Regina Henschel 2012-08-31 14:25:33 UTC
Please open the attached file in OO3.2. There the gradient had been correct.
Comment 2 Regina Henschel 2012-09-01 21:04:31 UTC
I think, the reason is in gradienttools.cxx. In case of square gradient, the target should not be expanded to the diagonal but only to the maximum of width and height.

With the patch the filling looks like it has been in OOo3.2 and edit mode and presentation mode are the same.

Armin, what do you think?
Comment 3 Regina Henschel 2012-09-01 21:05:36 UTC
Created attachment 79275 [details]
square target using maximum edge not diagonal
Comment 4 Armin Le Grand 2012-09-04 08:15:11 UTC
ALG: Hi Regina, thanks for the infos.
Does it look as it does when switching off AA?
Do you have an older version (SO5.2 or so?) without primitives?
Comment 5 Regina Henschel 2012-09-04 16:32:56 UTC
Switching AA on or off has no effect, neither in AOO35dev r1378069 nor after applying my patch.

I attach a zip-file with a lot of original files and a document "HistoryOfSquareGradientScreentshots.odg". There you find screenshots of the older files, so that you can get an overview.

All files contain a rectangle width 9cm, height 6cm, with square gradient in step count 5. The center is set to cx=50% and cy=50%, rotation is 0 degrees, border is 0%.
Comment 6 Regina Henschel 2012-09-04 16:34:07 UTC
Created attachment 79287 [details]
zip with original files and "History", a collection of screenshots
Comment 7 Armin Le Grand 2012-09-06 12:35:39 UTC
ALG: Regina, thanks for the examples and overview. I'm pretty convinced that your patch is good (thanks!), just wanted to take another look at an old SO5.2 (I have one at home). Reason is that versions before prmitives use the vcl rendering, so I would like to compare with that (not necessarily a SO5.2, but it's sure there).
Comment 8 SVN Robot 2012-09-07 13:33:29 UTC
"regina" committed SVN revision 1382021 into trunk:
#i120642# expand target to maximum edge not to diagonal
Comment 9 Armin Le Grand 2012-09-07 13:48:06 UTC
ALG:_ I installed a 5.2 (runs on Win7, some smaller problems, though :-)) and took a look. The steps are not correct there (corrected with primitives), but the mapping shows that Regina's patch is correct. Applying it.
Comment 10 SVN Robot 2012-09-07 13:53:05 UTC
"alg" committed SVN revision 1382027 into trunk:
#120642# streamlined a little bit
Comment 11 Armin Le Grand 2012-09-07 13:54:24 UTC
ALG: Streamlined a little bit. Okay, done. Thanks Regina!