Opened 12 years ago

Closed 11 years ago

#1987 closed defect (fixed)

Hatches from DWF files renders poorly using AGG Render

Reported by: fare Owned by: waltweltonlair
Priority: low Milestone:
Component: Drawing Service Version: 2.2.0
Severity: trivial Keywords:
Cc: External ID:

Description

Hatches from DWF files renders poorly over AGG. It look to me that this is similar to ticket #1257. I'm providing proof and sample data(DWF is published from AutoCAD Map 2012). Images are served over WMS (EPSG:31276).

Attachments (7)

AggBug.dwf (9.7 KB ) - added by fare 12 years ago.
Sample DWF file
AggBug.dwg (62.0 KB ) - added by fare 12 years ago.
Sample DWG file
ServedOverWmsAgg.png (254.2 KB ) - added by fare 12 years ago.
Poor rendering
Polytriangles.png (48.9 KB ) - added by fare 12 years ago.
How polytriangles looks
2.4Test2.png (35.3 KB ) - added by fare 12 years ago.
v2.4 test 2
HatchesFix.png (172.0 KB ) - added by fare 11 years ago.
Sample of rednering with gamma value 0.3
HatchesRendering.patch (2.8 KB ) - added by fare 11 years ago.
Proposed patch - fixed style

Download all attachments as: .zip

Change History (15)

by fare, 12 years ago

Attachment: AggBug.dwf added

Sample DWF file

by fare, 12 years ago

Attachment: AggBug.dwg added

Sample DWG file

by fare, 12 years ago

Attachment: ServedOverWmsAgg.png added

Poor rendering

by fare, 12 years ago

Attachment: Polytriangles.png added

How polytriangles looks

comment:1 by zspitzer, 12 years ago

can you try this out with the 2.4 test release?

In my own testing I found the DWF handling been improved

by fare, 12 years ago

Attachment: 2.4Test2.png added

v2.4 test 2

comment:2 by fare, 12 years ago

I tried version 2.4 test 2 and result is pretty much same.(see image)

comment:3 by zspitzer, 12 years ago

Summary: DWF render poor in AGGHatches from DWF files renders poorly using AGG Render

comment:4 by fare, 11 years ago

According to AGG sample page http://www.antigrain.com/demo/ and "gouraud" sample there are two methods that can be used to hide this kind of problem - dilating the polygons and/or changing the gamma-correction value.

I tried implementing the dilating polygons but didn't manage to remove artifacts. So I switched to gamma correction.

I'm proposing patch that is attached. Drawing polytriangles is separated to another method of AGGRenderer class. Basically method is copy of method that is used to draw polygons but before rendering occurs gamma value is set to low value (test showed that value between 0.3-0.5 gives satisfying results) and then restored to value 1.0 once rendering is done.

Lowering gamma value gives sharper outer edges(less anti-aliasing) but for me this is acceptable trade of.

by fare, 11 years ago

Attachment: HatchesFix.png added

Sample of rednering with gamma value 0.3

comment:5 by zspitzer, 11 years ago

Can you send a post about this patch to mapguide-internals and request a review?

comment:6 by fare, 11 years ago

Review request sent.

Thanks for suggestion zspitzer.

by fare, 11 years ago

Attachment: HatchesRendering.patch added

Proposed patch - fixed style

comment:7 by waltweltonlair, 11 years ago

Owner: set to waltweltonlair
Status: newassigned

comment:8 by waltweltonlair, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed in trunk with r7896.

Note: See TracTickets for help on using tickets.