gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/parser/shape_character_d...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d...
Date: Mon, 30 Apr 2007 13:03:31 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/04/30 13:03:31

Modified files:
        .              : ChangeLog 
        server/parser  : shape_character_def.cpp 

Log message:
                * server/parser/shape_character_def.cpp (compute_bounds): 
harline
                  strokes don't add anything to the bounds (no need to expand to
                  circle, same as for hidden strokes). -- this is just an 
optimization 
                  as expandToCirle(x,y,0) is equivalent to expandToPoint(x,y).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3038&r2=1.3039
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/shape_character_def.cpp?cvsroot=gnash&r1=1.20&r2=1.21

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3038
retrieving revision 1.3039
diff -u -b -r1.3038 -r1.3039
--- ChangeLog   30 Apr 2007 11:10:36 -0000      1.3038
+++ ChangeLog   30 Apr 2007 13:03:30 -0000      1.3039
@@ -1,5 +1,8 @@
 2007-04-30 Sandro Santilli <address@hidden>
 
+       * server/parser/shape_character_def.cpp (compute_bounds): harline
+         strokes don't add anything to the bounds (no need to expand to
+         circle, same as for hidden strokes).
        * testsuite/misc-ming.all/Makefile.am: 
          Activated action_execution_order_test{7,8}.
 

Index: server/parser/shape_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/shape_character_def.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- server/parser/shape_character_def.cpp       24 Apr 2007 12:01:55 -0000      
1.20
+++ server/parser/shape_character_def.cpp       30 Apr 2007 13:03:31 -0000      
1.21
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: shape_character_def.cpp,v 1.20 2007/04/24 12:01:55 udog Exp $ */
+/* $Id: shape_character_def.cpp,v 1.21 2007/04/30 13:03:31 strk Exp $ */
 
 // Based on the public domain shape.cpp of Thatcher Ulrich <address@hidden> 
2003
 
@@ -674,21 +674,15 @@
         size_t nedges = p.m_edges.size();
         if ( ! nedges ) continue;
         
-        if (p.m_line==0) {
-
-            r->expand_to_point(p.m_ax, p.m_ay);
-            for (unsigned int j = 0; j<nedges; j++)
+        if (p.m_line)
             {
-                r->expand_to_point(p.m_edges[j].m_ax, p.m_edges[j].m_ay);
-                r->expand_to_point(p.m_edges[j].m_cx, p.m_edges[j].m_cy);
-            }
-            
-        } else {        
-            
-            // NOTE: Half of get_width() would be enough (and correct) for
+               unsigned thickness=m_line_styles[p.m_line-1].get_width();
+               if ( thickness ) // hairlines don't add any bound
+               {
+                       // NOTE: Half of thickness would be enough (and 
correct) for
             // radius, but that would not match how Flash calculates the
             // bounds using the drawing API.                        
-            float radius = m_line_styles[p.m_line-1].get_width();
+                       float radius = thickness;
             
             r->expand_to_circle(p.m_ax, p.m_ay, radius);
             for (unsigned int j = 0; j<nedges; j++)
@@ -696,6 +690,18 @@
                 r->expand_to_circle(p.m_edges[j].m_ax, p.m_edges[j].m_ay, 
radius);
                 r->expand_to_circle(p.m_edges[j].m_cx, p.m_edges[j].m_cy, 
radius);
             }
+
+                       continue;
+               }
+       }
+
+       assert(p.m_line==0 || m_line_styles[p.m_line-1].get_width()==0);
+
+       r->expand_to_point(p.m_ax, p.m_ay);
+       for (unsigned int j = 0; j<nedges; j++)
+       {
+               r->expand_to_point(p.m_edges[j].m_ax, p.m_edges[j].m_ay);
+                r->expand_to_point(p.m_edges[j].m_cx, p.m_edges[j].m_cy);
         }
     }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]