[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/server/parser shape_character_def.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash/server/parser shape_character_def.cpp |
Date: |
Tue, 24 Apr 2007 10:05:55 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/04/24 10:05:55
Modified files:
server/parser : shape_character_def.cpp
Log message:
cleanups and more comments
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/shape_character_def.cpp?cvsroot=gnash&r1=1.18&r2=1.19
Patches:
Index: shape_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/parser/shape_character_def.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- shape_character_def.cpp 23 Apr 2007 20:05:20 -0000 1.18
+++ shape_character_def.cpp 24 Apr 2007 10:05:55 -0000 1.19
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: shape_character_def.cpp,v 1.18 2007/04/23 20:05:20 strk Exp $ */
+/* $Id: shape_character_def.cpp,v 1.19 2007/04/24 10:05:55 strk Exp $ */
// Based on the public domain shape.cpp of Thatcher Ulrich <address@hidden>
2003
@@ -607,16 +607,20 @@
return false;
}
+ size_t npaths = m_paths.size();
+
+ if ( ! npaths ) return false;
+
point pt(x, y);
// Try each of the paths.
- for (unsigned int i = 0; i < m_paths.size(); i++)
+ for (size_t i = 0; i < npaths; ++i)
{
- path& pth = m_paths[i];
+ const path& pth = m_paths[i];
- if ( pth.m_edges.empty() ) continue;
+ if ( pth.empty() ) continue;
- // If it has
+ // If it has a line style, check for strokes there
if ( pth.m_line != 0 )
{
assert(m_line_styles.size() >= pth.m_line);
@@ -637,6 +641,7 @@
if ( pth.withinSquareDistance(pt, sqdist) ) return true;
}
+ // Check for point in polygon (if filled - but that test is in
point_test itself)
if (pth.point_test(x, y)) return true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/server/parser shape_character_def.cpp,
Sandro Santilli <=