gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libgeometry/snappingrange.h gui...


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog libgeometry/snappingrange.h gui...
Date: Tue, 06 Mar 2007 14:27:22 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/03/06 14:27:22

Modified files:
        .              : ChangeLog 
        libgeometry    : snappingrange.h 
        gui            : gui.cpp 

Log message:
        implement snappingrange2d::growBy(); grow ranges by 2 pixels

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2550&r2=1.2551
http://cvs.savannah.gnu.org/viewcvs/gnash/libgeometry/snappingrange.h?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.65&r2=1.66

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.2550
retrieving revision 1.2551
diff -u -b -r1.2550 -r1.2551
--- ChangeLog   6 Mar 2007 11:08:46 -0000       1.2550
+++ ChangeLog   6 Mar 2007 14:27:22 -0000       1.2551
@@ -12,6 +12,9 @@
        * backend/render_handler_agg.cpp: Round outline edge anchor points to
          eliminate anti-aliasing blur and to do it the MM way...; draw 
outlines        
          always with at least 1.0 pixels width
+       * libgeometry/snappingrange2d.h: Implement growBy()
+       * gui/gui.cpp: grow invalidated ranges by 2 pixels to solve 
anti-aliasing
+         and outline displacement problems     
 
 2007-03-06 Sandro Santilli <address@hidden>
 

Index: libgeometry/snappingrange.h
===================================================================
RCS file: /cvsroot/gnash/gnash/libgeometry/snappingrange.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- libgeometry/snappingrange.h 5 Mar 2007 13:23:52 -0000       1.11
+++ libgeometry/snappingrange.h 6 Mar 2007 14:27:22 -0000       1.12
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 // 
-// $Id: snappingrange.h,v 1.11 2007/03/05 13:23:52 strk Exp $
+// $Id: snappingrange.h,v 1.12 2007/03/06 14:27:22 udog Exp $
 
 #ifndef GNASH_SNAPPINGRANGE_H
 #define GNASH_SNAPPINGRANGE_H
@@ -130,6 +130,20 @@
                        add(other_ranges.getRange(rno));
        }
        
+       /// Grows all ranges by the specified amount 
+       void growBy(T amount) {
+       
+               if (isWorld() || isNull()) 
+                       return;
+               
+               unsigned rcount = _ranges.size();
+               
+               for (unsigned int rno=0; rno<rcount; rno++)
+                       _ranges[rno].growBy(amount);
+                       
+               combine_ranges();
+       }
+       
        /// Combines known ranges. Previously merged ranges may have come close
        /// to other ranges. Algorithm could be optimized. 
        void combine_ranges() {

Index: gui/gui.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- gui/gui.cpp 28 Feb 2007 19:57:28 -0000      1.65
+++ gui/gui.cpp 6 Mar 2007 14:27:22 -0000       1.66
@@ -304,6 +304,9 @@
                // scan through all sprites to compute invalidated bounds  
                m->add_invalidated_bounds(changed_ranges, false);
                
+               // grow ranges by a 2 pixels to avoid anti-aliasing issues      
        
+               changed_ranges.growBy(40.0f / _xscale);
+               
                // optimize ranges
                changed_ranges.combine_ranges();
                




reply via email to

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