[mapguide-internals] Hatches from DWF files renders poorly using AGG Render - patch (Ticket 1987)

Walt Welton-Lair walt.welton-lair at autodesk.com
Wed Jun 5 19:49:34 PDT 2013


Hi Faruk,

I took a look at your proposed change.

The existing code was written to handle dots appearing in line patterns (a line symbol).
* In MgDev/Common/Stylization/SE_SymbolDefProxies.cpp, in SE_Polyline::evaluate, the code checks for zero-length segments, and replaces them with short line segments of length LINE_SEGMENT_DOT_SIZE.
* In AGGRenderer::_TransferPoints the code checks for these short segments and replaces them with one-pixel long lines.

In your case you have a dot appearing in a hatch pattern (an area symbol), but the code doesn't currently have any special handling for this.
* In SE_SymbolDefProxies.cpp, in SE_Polygon::evaluate, there's no check for zero-length segments.
* Consequently AGGRenderer::_TransferPoints doesn't modify the segment into a one-pixel long line that's actually visible when rendered.

Instead of your proposed fix, I think it would be better to update SE_Polygon::evaluate to have the same zero-length segment check as SE_Polyline::evaluate (the exact same block of code can be added to SE_Polyline::evaluate).  Then no change would be needed to AGGRenderer::_TransferPoints (or AGGRenderer::_TransferPointsClamped, which you didn't update).

Can you give that a try and let us know the result?

Thanks,
Walt

________________________________________
From: mapguide-internals-bounces at lists.osgeo.org [mapguide-internals-bounces at lists.osgeo.org] on behalf of Faruk Hadzic [faruk-h at fakat.ba]
Sent: Wednesday, June 05, 2013 3:53 AM
To: mapguide-internals at lists.osgeo.org
Subject: [mapguide-internals] Hatches from DWF files renders poorly using AGG Render - patch (Ticket 1987)

Hello to everyone,

I created patch/workaround for ticket #1987,
and I'm requesting review of this patch as suggested by zspitzer.

Best Regards,

Faruk
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals


More information about the mapguide-internals mailing list