Issue 121297

Summary: Gradient in metafile is not rotated together with metafile, if anti-aliasing is off.
Product: Impress Reporter: Regina Henschel <rb.henschel>
Component: viewingAssignee: Armin Le Grand <Armin.Le.Grand>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, binbjguo
Version: 4.0.0-dev   
Target Milestone: 4.0.0   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121425    
Attachments:
Description Flags
rectangle, metafile, rotated metafile none

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.