gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash backend/render_handler_agg.cpp ChangeLog


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash backend/render_handler_agg.cpp ChangeLog
Date: Tue, 31 Oct 2006 12:25:31 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   06/10/31 12:25:31

Modified files:
        backend        : render_handler_agg.cpp 
        .              : ChangeLog 

Log message:
        Fixed outlines width

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1459&r2=1.1460

Patches:
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- backend/render_handler_agg.cpp      31 Oct 2006 08:54:23 -0000      1.33
+++ backend/render_handler_agg.cpp      31 Oct 2006 12:25:31 -0000      1.34
@@ -16,7 +16,7 @@
 
  
 
-/* $Id: render_handler_agg.cpp,v 1.33 2006/10/31 08:54:23 udog Exp $ */
+/* $Id: render_handler_agg.cpp,v 1.34 2006/10/31 12:25:31 udog Exp $ */
 
 // Original version by Udo Giacomozzi and Hannes Mayr, 
 // INDUNET GmbH (www.indunet.it)
@@ -681,7 +681,7 @@
       
       for (int subshape=0; subshape<subshape_count; subshape++) {
         draw_shape(subshape, paths, fill_styles, cx, mat, true);    
-        draw_outlines(subshape, paths, line_styles, cx);
+        draw_outlines(subshape, paths, line_styles, cx, mat);
       }
     } // if not drawing mask
     
@@ -1082,7 +1082,8 @@
 
   /// Just like draw_shapes() except that it draws an outline.
   void draw_outlines(int subshape_id, const std::vector<path> &paths,
-    const std::vector<line_style> &line_styles, const cxform& cx) {
+    const std::vector<line_style> &line_styles, const cxform& cx,
+    const matrix& linestyle_matrix) {
     
     if (m_alpha_mask.empty()) {
     
@@ -1093,7 +1094,7 @@
       scanline_type sl;
       
       draw_outlines_impl<scanline_type> (subshape_id, paths, line_styles, 
-        cx, sl);
+        cx, linestyle_matrix, sl);
         
     } else {
     
@@ -1104,7 +1105,7 @@
       scanline_type sl(m_alpha_mask.back()->get_amask());
       
       draw_outlines_impl<scanline_type> (subshape_id, paths, line_styles, 
-        cx, sl);
+        cx, linestyle_matrix, sl);
         
     }
     
@@ -1115,7 +1116,7 @@
   template <class scanline_type>
   void draw_outlines_impl(int subshape_id, const std::vector<path> &paths,
     const std::vector<line_style> &line_styles, const cxform& cx, 
-    scanline_type& sl) {
+    const matrix& linestyle_matrix, scanline_type& sl) {
     
          assert(m_pixf != NULL);
          
@@ -1130,6 +1131,10 @@
     int pno, eno;
     int pcount, ecount;
     
+    // use avg between x and y scale
+    const float stroke_scale = 
+      (linestyle_matrix.get_x_scale() + linestyle_matrix.get_y_scale()) / 2.0f;
+    
     // AGG stuff
     renderer_base rbase(*m_pixf);
     agg::rasterizer_scanline_aa<> ras;  // anti alias
@@ -1166,11 +1171,10 @@
       const line_style &lstyle = line_styles[this_path.m_line-1];
       rgba color = cx.transform(lstyle.get_color());
       int width = lstyle.get_width();
-
       if (width==1)
         stroke.width(1);
       else
-        stroke.width(width*scale);
+        stroke.width(width*scale*stroke_scale);
       stroke.line_cap(agg::round_cap);
       stroke.line_join(agg::round_join);
 

Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.1459
retrieving revision 1.1460
diff -u -b -r1.1459 -r1.1460
--- ChangeLog   31 Oct 2006 11:26:50 -0000      1.1459
+++ ChangeLog   31 Oct 2006 12:25:31 -0000      1.1460
@@ -7,6 +7,8 @@
 
        * testsuite/movies.all/gravity-embed.swf: improved by providing
          explicit size control buttons and debugging textfield.
+       * backend/render_handler_agg.cpp: Outline sizes now respect the
+         transformation matrix
 
 2006-10-31 Sandro Santilli <address@hidden>
 




reply via email to

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