[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/cxform.cpp server/cxform.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/cxform.cpp server/cxform.h |
Date: |
Mon, 23 Apr 2007 14:37:52 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/04/23 14:37:52
Modified files:
. : ChangeLog
server : cxform.cpp cxform.h
Log message:
server/cxform.{cpp,h}: add output operator and toString method.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2970&r2=1.2971
http://cvs.savannah.gnu.org/viewcvs/gnash/server/cxform.cpp?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/server/cxform.h?cvsroot=gnash&r1=1.3&r2=1.4
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2970
retrieving revision 1.2971
diff -u -b -r1.2970 -r1.2971
--- ChangeLog 23 Apr 2007 13:45:17 -0000 1.2970
+++ ChangeLog 23 Apr 2007 14:37:52 -0000 1.2971
@@ -1,5 +1,6 @@
2007-04-23 Sandro Santilli <address@hidden>
+ * server/cxform.{cpp,h}: add output operator and toString method.
* server/DynamicShape.cpp (moveTo): do not reset current
fill style on move. Fixes some of the tests in DrawingApiTest.swf
and masks_test.swf.
Index: server/cxform.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/cxform.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- server/cxform.cpp 11 Apr 2007 14:20:20 -0000 1.1
+++ server/cxform.cpp 23 Apr 2007 14:37:52 -0000 1.2
@@ -15,7 +15,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-// $Id: cxform.cpp,v 1.1 2007/04/11 14:20:20 strk Exp $
+// $Id: cxform.cpp,v 1.2 2007/04/23 14:37:52 strk Exp $
//
#ifdef HAVE_CONFIG_H
@@ -162,6 +162,24 @@
log_parse("| %4.4f %4.4f|", m_[3][0], m_[3][1]);
}
+std::string
+cxform::toString() const
+{
+ std::stringstream ss;
+ ss << *this;
+ return ss.str();
+}
+
+std::ostream&
+operator<< (std::ostream& os, const cxform& cx)
+{
+ os << "r: *" << cx.m_[0][0] << " +" << cx.m_[0][1] << ", ";
+ os << "|g: *" << cx.m_[1][0] << " +" << cx.m_[1][1] << ", ";
+ os << "|b: *" << cx.m_[2][0] << " +" << cx.m_[2][1] << ", ";
+ os << "|a: *" << cx.m_[3][0] << " +" << cx.m_[3][1];
+ return os;
+}
+
bool cxform::is_identity() const
// Returns true when the cxform equals identity (no transform)
{
Index: server/cxform.h
===================================================================
RCS file: /sources/gnash/gnash/server/cxform.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- server/cxform.h 19 Apr 2007 05:23:30 -0000 1.3
+++ server/cxform.h 23 Apr 2007 14:37:52 -0000 1.4
@@ -37,6 +37,9 @@
class DSOEXPORT cxform
{
public:
+
+ friend std::ostream& operator<< (std::ostream& os, const cxform& cx);
+
/// [RGBA][multiply, add]
float m_[4][2];
@@ -76,6 +79,8 @@
/// The identity color transform (no transform)
static cxform identity;
+
+ std::string toString() const;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/cxform.cpp server/cxform.h,
Sandro Santilli <=