[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash server/shape.cpp server/shape.h ChangeLog
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash server/shape.cpp server/shape.h ChangeLog |
Date: |
Tue, 24 Apr 2007 09:20:16 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/04/24 09:20:15
Modified files:
server : shape.cpp shape.h
. : ChangeLog
Log message:
* server/shape.{cpp,h}: const-corrected point_test and
wihinSquareDistance();
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/shape.cpp?cvsroot=gnash&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/gnash/server/shape.h?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2979&r2=1.2980
Patches:
Index: server/shape.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/shape.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- server/shape.cpp 24 Apr 2007 07:15:08 -0000 1.34
+++ server/shape.cpp 24 Apr 2007 09:20:15 -0000 1.35
@@ -159,9 +159,7 @@
}
-bool path::point_test(float x, float y)
- // Point-in-shape test. Return true if the query point is on the filled
- // interior of this shape.
+bool path::point_test(float x, float y) const
{
if ( m_edges.empty() ) return false;
@@ -342,7 +340,7 @@
}
bool
-path::withinSquareDistance(const point& p, float dist)
+path::withinSquareDistance(const point& p, float dist) const
{
size_t nedges = m_edges.size();
Index: server/shape.h
===================================================================
RCS file: /sources/gnash/gnash/server/shape.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- server/shape.h 23 Apr 2007 19:19:30 -0000 1.21
+++ server/shape.h 24 Apr 2007 09:20:15 -0000 1.22
@@ -5,7 +5,7 @@
// Quadratic bezier outline shapes, the basis for most SWF rendering.
-/* $Id: shape.h,v 1.21 2007/04/23 19:19:30 strk Exp $ */
+/* $Id: shape.h,v 1.22 2007/04/24 09:20:15 strk Exp $ */
#ifndef GNASH_SHAPE_H
#define GNASH_SHAPE_H
@@ -106,7 +106,18 @@
return is_empty();
}
- bool point_test(float x, float y);
+ /// Point-in-shape test.
+ //
+ /// Return true if the query point is on the filled
+ /// interior of this shape.
+ ///
+ /// Return false if this path has no associated fill.
+ ///
+ /// WARNING: often a filled shape is composed by multiple
+ /// paths. we probably fail in those cases.
+ ///
+ ///
+ bool point_test(float x, float y) const;
/// Push the path into the tesselator.
void tesselate() const;
@@ -239,7 +250,7 @@
//
/// NOTE: if the path is empty, false is returned.
///
- bool withinSquareDistance(const point& p, float dist);
+ bool withinSquareDistance(const point& p, float dist) const;
//private:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2979
retrieving revision 1.2980
diff -u -b -r1.2979 -r1.2980
--- ChangeLog 24 Apr 2007 08:52:55 -0000 1.2979
+++ ChangeLog 24 Apr 2007 09:20:15 -0000 1.2980
@@ -1,5 +1,7 @@
2007-04-24 Sandro Santilli <address@hidden>
+ * server/shape.{cpp,h}: const-corrected point_test and
+ wihinSquareDistance();
* server/sprite_instance.cpp (sprite_lineStyle): alpha value is given
in percent, always pass the env to number converters.
* testsuite/misc-ming.all/DrawingApiTest.as: add test checking that
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash server/shape.cpp server/shape.h ChangeLog,
Sandro Santilli <=