[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/parser/shape_character_d...
From: |
Udo Giacomozzi |
Subject: |
[Gnash-commit] gnash ChangeLog server/parser/shape_character_d... |
Date: |
Mon, 12 Nov 2007 10:56:15 +0000 |
CVSROOT: /cvsroot/gnash
Module name: gnash
Changes by: Udo Giacomozzi <udog> 07/11/12 10:56:15
Modified files:
. : ChangeLog
server/parser : shape_character_def.cpp
Log message:
* server/parser/shape_character_def.cpp: point_test_local bugfix:
don't detect two crossings for the point at the junction of two
lines/curves.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4832&r2=1.4833
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/shape_character_def.cpp?cvsroot=gnash&r1=1.48&r2=1.49
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.4832
retrieving revision 1.4833
diff -u -b -r1.4832 -r1.4833
--- ChangeLog 12 Nov 2007 10:22:40 -0000 1.4832
+++ ChangeLog 12 Nov 2007 10:56:15 -0000 1.4833
@@ -1,3 +1,9 @@
+2007-11-12 Udo Giacomozzi <address@hidden>
+
+ * server/parser/shape_character_def.cpp: point_test_local bugfix:
+ don't detect two crossings for the point at the junction of two
+ lines/curves.
+
2007-11-12 Sandro Santilli <address@hidden>
* server/shape.cpp: (pointOnCurve): quicker return for T in (0,1);
Index: server/parser/shape_character_def.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/parser/shape_character_def.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- server/parser/shape_character_def.cpp 10 Nov 2007 14:39:52 -0000
1.48
+++ server/parser/shape_character_def.cpp 12 Nov 2007 10:56:15 -0000
1.49
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: shape_character_def.cpp,v 1.48 2007/11/10 14:39:52 strk Exp $ */
+/* $Id: shape_character_def.cpp,v 1.49 2007/11/12 10:56:15 udog Exp $ */
// Based on the public domain shape.cpp of Thatcher Ulrich <address@hidden>
2003
@@ -809,7 +809,6 @@
// Incoming coords are local coords.
{
-
/*
Principle:
For the fill of the shape, we project a ray from the test point to the left
@@ -882,7 +881,6 @@
return true;
}
-
// browse all edges of the path
for (unsigned eno=0; eno<nedges; eno++) {
@@ -916,8 +914,11 @@
continue;
// does this line cross the Y coordinate?
- if ( ((pen_y <= y) && (edg.ap.y >= y))
- || ((pen_y >= y) && (edg.ap.y <= y)) ) {
+ // NOTE: We don't want to detect a crossing at the end of the line,
+ // (simply put, the last pixel) because the next line (connected to
this
+ // one) will also cross the Y coordinate.
+ if ( ((pen_y <= y) && (edg.ap.y > y))
+ || ((pen_y >= y) && (edg.ap.y < y)) ) {
// calculate X crossing
cross1 = pen_x + (edg.ap.x - pen_x) *
@@ -944,6 +945,19 @@
crosscount = curve_x_crossings(pen_x, pen_y, edg.ap.x, edg.ap.y,
edg.cp.x, edg.cp.y, y, cross1, cross2);
+ // Safety check: remove any crossing at the very end of the curve.
+ // Any line or curve connected to this one would also detect a
crossing,
+ // which is bad since we don't want double crossings for a single
point.
+ // Assuming that cross2 is always near to the end, we won't find a
+ // cross1 at the end of the curve when there is a cross2 (so no moving
+ // is necessary).
+
+ if ((crosscount==2) && (y==edg.ap.y) && (cross2==edg.ap.x))
+ crosscount--;
+ else
+ if ((crosscount==1) && (y==edg.ap.y) && (cross1==edg.ap.x))
+ crosscount--;
+
dir1 = pen_y > y ? -1 : +1;
dir2 = dir1 * (-1); // second crossing always in opposite dir.
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., (continued)
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., strk, 2007/11/12
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., strk, 2007/11/12
- Re[2]: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., Udo Giacomozzi, 2007/11/12
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., strk, 2007/11/12
- Re[2]: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., Udo Giacomozzi, 2007/11/12
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., strk, 2007/11/12
- Re[2]: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., Udo Giacomozzi, 2007/11/12
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., strk, 2007/11/12
- Re[2]: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., Udo Giacomozzi, 2007/11/12
- Re: [Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., strk, 2007/11/12
[Gnash-commit] gnash ChangeLog server/parser/shape_character_d...,
Udo Giacomozzi <=
[Gnash-commit] gnash ChangeLog server/parser/shape_character_d..., Udo Giacomozzi, 2007/11/12