Apache OpenOffice (AOO) Bugzilla – Issue 121297
Gradient in metafile is not rotated together with metafile, if anti-aliasing is off.
Last modified: 2022-10-28 12:54:30 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.
ALG: Taking over
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.
ALG: Works as expected, done the cleanups described above. Some more checks...
"alg" committed SVN revision 1415144 into trunk: #121297# corrected non-AAed gradient rendering when in rotated metafiles, som...
ALG: Okay, comitted, done.
Verified on Aoo_Trunk_20121203.1303 Rev.1413470, it is fixed.
close it
added info into wrong bug number, please ignore the comments added by me above.