Apache OpenOffice (AOO) Bugzilla – Issue 98289
charts are not sharp / in metafiles also horizontal and vertical lines get antialized
Last modified: 2009-02-26 14:10:00 UTC
Load the attached document or create a simple chart and leave the edit mode. Since dev300m39 the created meta file looks diffuse. It seems as if even horizontal and vertical lines are antialized and/or stretched somehow. When deselecting the anti-aliasing option the problem is gone. When activating the chart within the edit mode the problem is also gone. In edit mode the horizontal and vertical lines are sharp and not antialized whereas the diagonal line is nicely antialized. The same visible result should be generated by the metafile.
Created attachment 59533 [details] example showing the problem
AW: The example shows that somehow metafiles and charts (activated) are handled different. Checked this and it seems as if VCL still does not use the AA and direct system shortcuts everywhere, so for the activated chart the polygon(s) get converted to vcl:polygon and back once in a cascade of DrawPolyLine calls. This lets the points snap to pixels which leads to not-AAed horizontal and vertical lines. This needs to be fixed first to get a homogen AAing in all situations. 2nd thought is to add a 'pixel snap' for horizontal and vertical lines to improve visualisation for charts, but this may be done for everything (need to evaluate). First checking VCL, will need HDUs opinion on this.
AW: Okay, VCL changes are okay (asked HDU), the #ifded UNX is a relict from the phase of adding the needed features. I will opt for adding support for snapping Horizontal/Vertical lines to discrete pixels at the renderers. It's not an option which should be part of VCL; we plan anyways to go more away from it with the DrawingLayer. I will also add a feature to the Drawinglayer configuration to be able to switch this off on demand. The RenderPolygonHairlinePrimitive2D will when the feature is turned on take needed actions.
AW: Added option to SvtOptionsDrawingLayer, added tooling to basegfx, added usage of it in vcl renderer. Works as expected for DrawingLayer, BUT not for MetaFiles. This is because these are solely played from VCL. Argh.
AW: Problem with MetaFiles not solvable outside VCL as long as these are not decomposed (this is the direction for the near future). Added a ANTIALIASING_PIXELSNAPHAIRLINE flag for OutputDevice::SetAntialiasing, using it in PRIMITIVE2D_ID_METAFILEPRIMITIVE2D case in VclPixelProcessor2D::processBasePrimitive2D to explicitely set it for MetaFile rendering. Usage is in two OutputDevice::DrawPolyLine methods in VCL. Works well, checking some more...
AW: Works well, all visualisations profit from that feature, so default is on for all geometry. Checking in. Changes in basegfx, drawinglayer, vcl, officecfg und svtools. Checking currently not possible, need to wait.
AW: BTW: This is not broken, but a new enhancement mainly for charts. AA works as defined. Changing entries accordingly.
AW: Checkin done, fininshed.
AW->WG: Please verify. Only has effects when AA is on and forces horizontal and vertical lines to snap to pixels, so that they are not blurred by AAing them.
Verified in CWS.
*** Issue 99481 has been marked as a duplicate of this issue. ***
Tested in OOO310_m3. Closed.
Not all cases are fixed. Create follow up issues: issue 99662 and issue 99665.