Opened 17 years ago

Closed 16 years ago

#291 closed defect (fixed)

Symbolization: Fix various problems in the stylization code

Reported by: waltweltonlair Owned by: waltweltonlair
Priority: high Milestone: 2.0
Component: Server Version:
Severity: major Keywords:
Cc: External ID: 815025.01 1040023 1007325

Description

Placeholder ticket to fix various defects that are uncovered with the new stylization code.

Change History (21)

comment:1 by waltweltonlair, 17 years ago

Status: newassigned

comment:2 by waltweltonlair, 17 years ago

Fixed bug involving empty layers with submission http://trac.osgeo.org/mapguide/changeset/2299.

comment:3 by waltweltonlair, 17 years ago

The Renderer::StartFeature method was not being called consistently in the case where you have multiple rendering passes. In the old stylization you get multiple passes if you have multiple LineTypeStyles, and in this case StartFeature was called for each feature with each pass. In the new stylization you get multiple passes when the RenderingPass values are set on a SymbolInstance or CompoundSymbol, but in this case we would only call StartFeature for the initial pass.

I've updated the code to be consistent and always call StartFeature, regardless of which rendering pass is active. I also updated the method to include an 'initialPass' boolean argument. This is potentially useful information for renderers which do stuff in their StartFeature implementation.

http://trac.osgeo.org/mapguide/changeset/2314.

comment:4 by waltweltonlair, 17 years ago

LineBuffer::Reset was not properly resetting the bounds in the case of m_bProcessZ=true. Also cleaned up some usage of DBL_MAX:

old: m_maxz = (-1) * DBL_MAX;

new: m_maxz = -DBL_MAX;

http://trac.osgeo.org/mapguide/changeset/2318

comment:5 by waltweltonlair, 17 years ago

The stylization engine would generate an access violation if it encountered a symbol with a path with empty geometry. This is now fixed.

http://trac.osgeo.org/mapguide/changeset/2319

comment:6 by waltweltonlair, 17 years ago

Updated SE_Renderer::ProcessPoint() to have an additional RS_Bounds* argument in which the bounds of the rendered symbol can be returned. This is analogous to Renderer::ProcessMarker.

http://trac.osgeo.org/mapguide/changeset/2320

comment:7 by waltweltonlair, 17 years ago

Added a separate helper method to create the custom stylization expression functions. Also updated the helper methods to allow passing in NULL values for the renderer and reader.

http://trac.osgeo.org/mapguide/changeset/2323

comment:8 by waltweltonlair, 16 years ago

Changed a "const RS_Color&" argument in RS_FontEngine::DrawString to non-const. This avoids having to do a silly cast later so you can access the ARGB values.

http://trac.osgeo.org/mapguide/changeset/2332

comment:9 by waltweltonlair, 16 years ago

Any closed Path graphic element in a symbol was always drawing as a polygon, while any unclosed Path graphic element was always drawing as a polyline. This was regardless of any fill or line color settings defined on the Path element. I've fixed this. The code now checks the SE_RenderPrimitive type (in this case polygon or polyline) to determine what geometry type to set.

Fixed an arc tolerance bug with DWF Viewer. The tolerance was being set way too low, resulting in far too many tessellated segments. Logical units were being misinterpreted as pixels.

http://trac.osgeo.org/mapguide/changeset/2334

comment:10 by waltweltonlair, 16 years ago

The custom stylization expression functions have been localized: function and argument descriptions have been moved to the resource file.

Note that the Stylization project now depends on Foundation (needed so we can easily load the resource strings).

http://trac.osgeo.org/mapguide/changeset/2350

comment:11 by waltweltonlair, 16 years ago

Fix out-of-memory crashes in line stylization with overlap-wrap.

http://trac.osgeo.org/mapguide/changeset/2361

comment:12 by waltweltonlair, 16 years ago

The join code was crashing in the case where the in or out TxData vectors were empty. Submitted a fix from Louis to prevent this.

http://trac.osgeo.org/mapguide/changeset/2379

comment:13 by waltweltonlair, 16 years ago

Prevents various crashes in wrapping line stylization (submitted by Jason).

http://trac.osgeo.org/mapguide/changeset/2390

comment:14 by waltweltonlair, 16 years ago

Fixed a couple of memory leaks in the stylization and rendering code:

  • SE_LineBuffer::Clone was overwriting a LineBuffer pointer without first deleting it
  • The Renderer base class did not declare a virtual destructor. Deleting a Renderer pointer (which now happens in many places in MgServerRenderingService) would therefore not result in the destructors of the derived classes to be called, resulting in big leaks. The Renderer class and all derived classes now have virtual destructors.

http://trac.osgeo.org/mapguide/changeset/2408

comment:15 by waltweltonlair, 16 years ago

Limit line weight during stylization. We now check the line weight when processing the Path and DefaultPath elements. The stylization and rendering code isn't always happy when you give it huge values (e.g. 100000000) for the weight. The weight - as measured in mm device space - is now limited to 1000 mm. Can anyone think of a use case for rendering using a line weight greater than one meter (the size of the output device would need to at least be one meter)?

http://trac.osgeo.org/mapguide/changeset/2413

comment:17 by waltweltonlair, 16 years ago

Fix handling of columns of area style positions of zero length. Add support for AddToExclusionRegion to OverlapWrap linestyles, and to area styles.

http://trac.osgeo.org/mapguide/changeset/2439

comment:18 by waltweltonlair, 16 years ago

External ID: 1040023

comment:19 by waltweltonlair, 16 years ago

External ID: 10400231040023 815025.01

comment:20 by waltweltonlair, 16 years ago

External ID: 1040023 815025.01815025.01 1040023 1007325

comment:21 by tomfukushima, 16 years ago

Resolution: fixed
Status: assignedclosed

Closing for 2.0. Please create another ticket for 2.1.

Note: See TracTickets for help on using tickets.