Issue 121297 - Gradient in metafile is not rotated together with metafile, if anti-aliasing is off.
Summary: Gradient in metafile is not rotated together with metafile, if anti-aliasing ...
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: viewing (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:
URL:
Keywords:
Depends on:
Blocks: 121425
  Show dependency tree
 
Reported: 2012-10-31 12:05 UTC by Regina Henschel
Modified: 2022-10-28 12:54 UTC (History)
2 users (show)

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


Attachments
rectangle, metafile, rotated metafile (16.04 KB, application/vnd.oasis.opendocument.presentation)
2012-10-31 12:05 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-10-31 12:05:00 UTC
Created attachment 79843 [details]
rectangle, metafile, rotated metafile

The attached file contains a rectangle with gradient (left), a metafile converted from that rectangle (middle), and the metafile rotated (right).

Switch Anti-Aliasing on and off. Notice, that in the rotated Metafile the gradient does not rotate, if Anti-Aliasing is off. This is only in edit mode. In presentation mode the gradient rotates together with the metafile.

I use r1403730 for testing.
Comment 1 Armin Le Grand 2012-11-01 11:59:22 UTC
ALG: Taking over
Comment 2 Armin Le Grand 2012-11-29 12:12:41 UTC
ALG: The difference is in VclProcessor2D::RenderPolyPolygonGradientPrimitive2D where for AA always the decomposition is used, for non-AA impDrawGradientToOutDev draws gradients the old way using the whole object range as base for processing. Of course for gradients inside metafiles (where these metafiles are converted to sequelces of primitives as well) to get the rotation applied to the metafile, also the decomposition has to be used.
That would mean to add a flag to vclpixelprocessor2d at case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D and use it in VclProcessor2D::RenderPolyPolygonGradientPrimitive2D.
It would be simpler to remove the impDrawGradientToOutDev completely and always use the decomposition. It is even possible to remove RenderPolyPolygonGradientPrimitive2D since it's only used in the pixel processor. Also RenderMetafilePrimitive2D is not used anymore and could also be cleaned up since the metafile to primtive convertter is working so well.
Comment 3 Armin Le Grand 2012-11-29 12:30:58 UTC
ALG: Works as expected, done the cleanups described above. Some more checks...
Comment 4 SVN Robot 2012-11-29 12:35:02 UTC
"alg" committed SVN revision 1415144 into trunk:
#121297# corrected non-AAed gradient rendering when in rotated metafiles, som...
Comment 5 Armin Le Grand 2012-11-29 12:35:23 UTC
ALG: Okay, comitted, done.
Comment 6 binguo 2012-12-06 10:35:05 UTC
Verified on Aoo_Trunk_20121203.1303 Rev.1413470, it is fixed.
Comment 7 binguo 2012-12-06 10:35:17 UTC
close it
Comment 8 binguo 2012-12-06 10:39:25 UTC
added info into wrong bug number, please ignore the comments added by me above.