[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libgeometry/Range2d.h testsuite...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libgeometry/Range2d.h testsuite... |
Date: |
Fri, 08 Dec 2006 11:54:11 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/12/08 11:54:11
Modified files:
. : ChangeLog
libgeometry : Range2d.h
testsuite : MovieTester.cpp MovieTester.h
Log message:
* libgeometry/Range2d.h: properly inlined specialized
round{Min,Max} functions.
* testsuite/MovieTester.{h,cpp}: changed getInvalidatedBounds
to return bounds in PIXELS rather then TWIPS (to
conform with mouse movement notification)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1889&r2=1.1890
http://cvs.savannah.gnu.org/viewcvs/gnash/libgeometry/Range2d.h?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.cpp?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/MovieTester.h?cvsroot=gnash&r1=1.7&r2=1.8
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1889
retrieving revision 1.1890
diff -u -b -r1.1889 -r1.1890
--- ChangeLog 8 Dec 2006 11:07:40 -0000 1.1889
+++ ChangeLog 8 Dec 2006 11:54:10 -0000 1.1890
@@ -1,5 +1,13 @@
2006-12-08 Sandro Santilli <address@hidden>
+ * libgeometry/Range2d.h: properly inlined specialized
+ round{Min,Max} functions.
+ * testsuite/MovieTester.{h,cpp}: changed getInvalidatedBounds
+ to return bounds in PIXELS rather then TWIPS (to
+ conform with mouse movement notification)
+
+2006-12-08 Sandro Santilli <address@hidden>
+
* libgeometry/Range2d.h: implemented cast between range types,
with float=>{int,unsigned int} cast ensuring resulting range
is not smaller then original.
Index: libgeometry/Range2d.h
===================================================================
RCS file: /sources/gnash/gnash/libgeometry/Range2d.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- libgeometry/Range2d.h 8 Dec 2006 11:07:41 -0000 1.7
+++ libgeometry/Range2d.h 8 Dec 2006 11:54:11 -0000 1.8
@@ -19,7 +19,7 @@
//
-/* $Id: Range2d.h,v 1.7 2006/12/08 11:07:41 strk Exp $ */
+/* $Id: Range2d.h,v 1.8 2006/12/08 11:54:11 strk Exp $ */
#ifndef GNASH_RANGE2D_H
#define GNASH_RANGE2D_H
@@ -736,7 +736,7 @@
//
/// Use floor.
///
-template <> int
+template <> inline int
Range2d<int>::roundMin(float min)
{
return (int)floor(min);
@@ -746,7 +746,7 @@
//
/// Use floor.
///
-template <> unsigned int
+template <> inline unsigned int
Range2d<unsigned int>::roundMin(float min)
{
return (unsigned int)floor(min);
@@ -756,7 +756,7 @@
//
/// Use ceil.
///
-template <> int
+template <> inline int
Range2d<int>::roundMax(float max)
{
return (int)ceil(max);
@@ -766,7 +766,7 @@
//
/// Use ceil.
///
-template <> unsigned int
+template <> inline unsigned int
Range2d<unsigned int>::roundMax(float max)
{
return (unsigned int)ceil((float)max);
Index: testsuite/MovieTester.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- testsuite/MovieTester.cpp 6 Dec 2006 10:21:32 -0000 1.14
+++ testsuite/MovieTester.cpp 8 Dec 2006 11:54:11 -0000 1.15
@@ -135,13 +135,25 @@
return _movie_root->isMouseOverActiveEntity();
}
-geometry::Range2d<float>
+geometry::Range2d<int>
MovieTester::getInvalidatedBounds() const
{
+ using namespace gnash::geometry;
+
rect ret;
_movie_root->clear_invalidated();
_movie_root->get_invalidated_bounds(&ret, false);
- return ret.getRange();
+
+ Range2d<float> range = ret.getRange();
+
+ // scale by 1/20 (twips to pixels)
+ range.scale(1/20);
+
+ // Convert to integer range.
+ Range2d<int> pixrange(range);
+
+ return pixrange;
+
}
} // namespace gnash
Index: testsuite/MovieTester.h
===================================================================
RCS file: /sources/gnash/gnash/testsuite/MovieTester.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- testsuite/MovieTester.h 6 Dec 2006 09:27:31 -0000 1.7
+++ testsuite/MovieTester.h 8 Dec 2006 11:54:11 -0000 1.8
@@ -53,11 +53,11 @@
/// Advance the movie by one frame
void advance();
- /// Return the invalidated bounds in TWIPS
+ /// Return the invalidated bounds in PIXELS
//
/// This is to debug/test partial rendering
///
- geometry::Range2d<float> getInvalidatedBounds() const;
+ geometry::Range2d<int> getInvalidatedBounds() const;
/// Find a character in the display list of a sprite by name.
//