0 Replies Latest reply on Aug 4, 2009 4:11 PM by Evtim Georgiev (Adobe)

    [svn:fx-trunk] 9091: Fix bug http://bugs.adobe.com/jira/browse/ SDK-22181 LayoutBoundsHeight and LayoutBoundWidth has rounding errors for rotated paths + optimizations

    Evtim Georgiev (Adobe)

      Revision: 9091

      Author:   egeorgie@adobe.com

      Date:     2009-08-04 16:11:37 -0700 (Tue, 04 Aug 2009)

       

      Log Message:

      ***********

      Fix bug http://bugs.adobe.com/jira/browse/SDK-22181 LayoutBoundsHeight and LayoutBoundWidth has rounding errors for rotated paths + optimizations

       

      Fix: Path used to draw into a shape to determine the bounds, which had rounding error to the 1/20th of the pixel. Calculate the bounds directly by going through the segments instead - this yields full double precision.

      Additional changes:

      1. Reduce the number of dynamic Points allocated

      2. Remove the CloseSegment and replace it with a LineSegment

      3. Optimize the bounds() code to look at each line segment's points only once

       

      Additional changes bring 10% speed improvement in path layout over the trunk baseline for a test case of 5,000 star paths in a TileLayout (each with 9 line segments and 1 close segment).

       

      QE notes: None

      Doc notes: None

      Bugs: SDK-22181

      Reviewer: Jason

      Tests run: checkintests, gumbo/layout, graphicTags, gumbo/core/Group

       

      Is noteworthy for integration: Yes, bug SDK-22181 came from the Thermo team

       

      Ticket Links:

      ************

          http://bugs.adobe.com/jira/browse/SDK-22181

          http://bugs.adobe.com/jira/browse/SDK-22181

          http://bugs.adobe.com/jira/browse/SDK-22181

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as