[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/shape.cpp server/shape.h
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/shape.cpp server/shape.h |
Date: |
Mon, 05 Nov 2007 08:06:03 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/11/05 08:06:03
Modified files:
. : ChangeLog
server : shape.cpp shape.h
Log message:
* server/shape.{cpp,h}: drop the point_test method, not much
useful
on its own ...
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4764&r2=1.4765
http://cvs.savannah.gnu.org/viewcvs/gnash/server/shape.cpp?cvsroot=gnash&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/gnash/server/shape.h?cvsroot=gnash&r1=1.25&r2=1.26
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4764
retrieving revision 1.4765
diff -u -b -r1.4764 -r1.4765
--- ChangeLog 4 Nov 2007 23:12:55 -0000 1.4764
+++ ChangeLog 5 Nov 2007 08:06:02 -0000 1.4765
@@ -1,5 +1,10 @@
2007-11-05 Sandro Santilli <address@hidden>
+ * server/shape.{cpp,h}: drop the point_test method, not much useful
+ on its own ...
+
+2007-11-05 Sandro Santilli <address@hidden>
+
* server/shape.{cpp,h}: extract a ray_crossing out of point_test.
* server/parser/shape_character_def.cpp (point_test): use
path::ray_crossing against any filled path, to detect fills
Index: server/shape.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/shape.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- server/shape.cpp 4 Nov 2007 23:12:56 -0000 1.40
+++ server/shape.cpp 5 Nov 2007 08:06:03 -0000 1.41
@@ -320,26 +320,6 @@
return;
}
-
-bool path::point_test(float x, float y) const
-{
- if ( m_edges.empty() ) return false;
-
- // No fill, nothing more to check.
- if (m_fill0 == 0 && m_fill1 == 0) return false;
-
- int ray_crossings = 0;
- ray_crossing(ray_crossings, x, y);
-
- if (ray_crossings & 1) {
- // Odd number of ray crossings means the point
- // is inside the poly.
- return true;
- }
- return false;
-}
-
-
void path::tesselate() const
// Push this path into the tesselator.
{
Index: server/shape.h
===================================================================
RCS file: /sources/gnash/gnash/server/shape.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- server/shape.h 4 Nov 2007 23:12:56 -0000 1.25
+++ server/shape.h 5 Nov 2007 08:06:03 -0000 1.26
@@ -5,7 +5,7 @@
// Quadratic bezier outline shapes, the basis for most SWF rendering.
-/* $Id: shape.h,v 1.25 2007/11/04 23:12:56 strk Exp $ */
+/* $Id: shape.h,v 1.26 2007/11/05 08:06:03 strk Exp $ */
#ifndef GNASH_SHAPE_H
#define GNASH_SHAPE_H
@@ -106,28 +106,10 @@
return is_empty();
}
- /// Point-in-shape test.
- //
- /// Return true if the query point is on the filled
- /// interior of this shape.
- ///
- /// Note that boundaries are NOT checked (a point of the
boundary
- /// will return false here).
- /// Use withinSquareDistance() for boundary checking.
- ///
- /// 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.
- /// Use the ray_crossing() function to compute
- /// Point-in-shape for multi-path shapes.
- ///
- bool point_test(float x, float y) const;
-
/// Ray crossing count.
//
/// Update ray crossing for the given query point using
- /// edges in this path.
+ /// edges in this path. Used to detect point in shape.
///
/// @param ray_crossings
/// Number of crossings, updated by this method.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog server/shape.cpp server/shape.h,
Sandro Santilli <=