gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash/server matrix.cpp matrix.h


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash/server matrix.cpp matrix.h
Date: Thu, 02 Nov 2006 14:00:55 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   06/11/02 14:00:55

Modified files:
        server         : matrix.cpp matrix.h 

Log message:
        Added function to scale with different x/y values

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/matrix.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/matrix.h?cvsroot=gnash&r1=1.3&r2=1.4

Patches:
Index: matrix.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/matrix.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- matrix.cpp  29 Oct 2006 18:34:11 -0000      1.5
+++ matrix.cpp  2 Nov 2006 14:00:55 -0000       1.6
@@ -18,7 +18,7 @@
 //
 // Original author: Thatcher Ulrich <address@hidden> 2003
 //
-// $Id: matrix.cpp,v 1.5 2006/10/29 18:34:11 rsavoye Exp $ 
+// $Id: matrix.cpp,v 1.6 2006/11/02 14:00:55 udog Exp $ 
 //
 
 #ifdef HAVE_CONFIG_H
@@ -125,6 +125,15 @@
        m_[1][1] *= infinite_to_fzero(scale);
 }
 
+void   
+matrix::concatenate_scales(float x, float y)
+// Just like concatenate_scale() but with different scales for x/y
+{
+       m_[0][0] *= infinite_to_fzero(x);
+       m_[0][1] *= infinite_to_fzero(x);
+       m_[1][0] *= infinite_to_fzero(y);
+       m_[1][1] *= infinite_to_fzero(y);
+}
 
 void
 matrix::set_lerp(const matrix& m1, const matrix& m2, float t)

Index: matrix.h
===================================================================
RCS file: /cvsroot/gnash/gnash/server/matrix.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- matrix.h    29 Oct 2006 18:34:11 -0000      1.3
+++ matrix.h    2 Nov 2006 14:00:55 -0000       1.4
@@ -18,7 +18,7 @@
 //
 // Original author: Thatcher Ulrich <address@hidden> 2003
 //
-// $Id: matrix.h,v 1.3 2006/10/29 18:34:11 rsavoye Exp $ 
+// $Id: matrix.h,v 1.4 2006/11/02 14:00:55 udog Exp $ 
 //
 
 #ifndef GNASH_MATRIX_H
@@ -97,6 +97,9 @@
        ///
        void    concatenate_scale(float s);
 
+  /// Just like concatenate_scale() but with different scales for x/y 
+       void    concatenate_scales(float x, float y);
+
        /// Set this matrix to a blend of m1 and m2, parameterized by t.
        void    set_lerp(const matrix& m1, const matrix& m2, float t);
 




reply via email to

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