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: Thu, 23 Aug 2007 14:06:55 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/08/23 14:06:55

Modified files:
        backend        : render_handler_agg.cpp 
        .              : ChangeLog 

Log message:
        Initial support for glyphs with known bounds

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.98&r2=1.99
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4081&r2=1.4082

Patches:
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -b -r1.98 -r1.99
--- backend/render_handler_agg.cpp      23 Aug 2007 13:04:09 -0000      1.98
+++ backend/render_handler_agg.cpp      23 Aug 2007 14:06:54 -0000      1.99
@@ -17,7 +17,7 @@
 
  
 
-/* $Id: render_handler_agg.cpp,v 1.98 2007/08/23 13:04:09 udog Exp $ */
+/* $Id: render_handler_agg.cpp,v 1.99 2007/08/23 14:06:54 udog Exp $ */
 
 // Original version by Udo Giacomozzi and Hannes Mayr, 
 // INDUNET GmbH (www.indunet.it)
@@ -908,13 +908,25 @@
 
 
 
+  // ensures that the bounds of the character definiton are known
+  inline void need_shape_bounds(shape_character_def *def) {
+  
+    // TO BE REMOVED - does not work
+  
+    if (def->get_bound().is_null()) {
+      printf("Calculating bounds for %p\n", def);
+      rect temp;
+      def->compute_bound(&temp);
+      def->set_bound(temp);
+    }
+  
+  }
 
   void draw_glyph(shape_character_def *def,
       const matrix& mat, const rgba& color, float /*pixel_scale*/) {
       
-    // NOTE: def->get_bound() is NULL for glyphs so we can't check the 
-    // clipping area (bounds_in_clipping_area):
-    // create a new path with the matrix applied   
+    //need_shape_bounds(def);    
+      
     std::vector<path> paths;    
     apply_matrix_to_path(def->get_paths(), paths, mat);
     
@@ -929,13 +941,14 @@
     agg_style_handler sh;
     build_agg_styles(sh, m_single_fill_styles, mat, m_neutral_cxform);
     
-    // select all clipping ranges. 
-    // NOTE: Glyphs are loaded like normal shape definitons, but w/o style
-    // definitons, which unfortunately include shape bounds. So "def" has
-    // no bounds (isNull) and thus select_clipbounds() won't work.
-    // TODO: Find a different solution since it's suboptimal to render in
-    // all clipping bounds.
+    // select relevant clipping bounds
+    if (def->get_bound().is_null())   // currently true for all glyphs
     select_all_clipbounds();
+    else
+      select_clipbounds(def, mat);
+    
+    
+    if (_clipbounds_selected.empty()) return; // nothing to draw
       
     // draw the shape
     if (m_drawing_mask)

Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.4081
retrieving revision 1.4082
diff -u -b -r1.4081 -r1.4082
--- ChangeLog   23 Aug 2007 10:11:48 -0000      1.4081
+++ ChangeLog   23 Aug 2007 14:06:54 -0000      1.4082
@@ -1,3 +1,8 @@
+2007-08-23 Udo Giacomozzi <address@hidden>
+
+       * backend/render_handler_agg.cpp: Initial support for glyphs
+         with known bounds
+
 2007-08-23 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/case.as: reduce alpha of clips used




reply via email to

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