gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/DynamicShape.h server/pa...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/DynamicShape.h server/pa...
Date: Fri, 09 Nov 2007 09:31:22 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/11/09 09:31:22

Modified files:
        .              : ChangeLog 
        server         : DynamicShape.h 
        server/parser  : shape_character_def.h 

Log message:
        Override point_test_local in DynamicShape to finalize the drawing.
        This is bogus, comment document the why and what test to add to show 
that.
        I commit nonetheless so we have a non-failing make check till we add the
        new test showing the break.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4813&r2=1.4814
http://cvs.savannah.gnu.org/viewcvs/gnash/server/DynamicShape.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/shape_character_def.h?cvsroot=gnash&r1=1.16&r2=1.17

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4813
retrieving revision 1.4814
diff -u -b -r1.4813 -r1.4814
--- ChangeLog   8 Nov 2007 23:59:41 -0000       1.4813
+++ ChangeLog   9 Nov 2007 09:31:21 -0000       1.4814
@@ -1,3 +1,9 @@
+2007-11-09 Sandro Santilli <address@hidden>
+
+       * server/DynamicShape.h, server/parser/shape_character_def.h: 
+         override point_test_local in DynamicShape to finalize
+         the drawing (bogus, contains comment for the why and how to fix)
+
 2007-11-08 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/Global.as: add test for existence of

Index: server/DynamicShape.h
===================================================================
RCS file: /sources/gnash/gnash/server/DynamicShape.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/DynamicShape.h       7 Nov 2007 12:08:16 -0000       1.6
+++ server/DynamicShape.h       9 Nov 2007 09:31:22 -0000       1.7
@@ -16,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-/* $Id: DynamicShape.h,v 1.6 2007/11/07 12:08:16 strk Exp $ */
+/* $Id: DynamicShape.h,v 1.7 2007/11/09 09:31:22 strk Exp $ */
 
 #ifndef GNASH_DYNAMIC_SHAPE_H
 #define GNASH_DYNAMIC_SHAPE_H
@@ -86,6 +86,29 @@
        ///
        size_t add_line_style(const line_style& stl);
 
+       // Override from shape_character_def to call ::finalize
+       // NOTE: this is not correct in that a call to hitTest should
+       //       not force closing the path being drawn.
+       //       Instead, the closeup should be "temporary" and int
+       //       the point_test_local itself (but only for dynamic drawing).
+       //       We need to add a testcase for this as we currently have none.
+       //       The testcase would look like this:
+       //
+       //       moveTo(0, 0); lineTo(10, 0); lineTo(10, 10); // an L shape so 
far
+       //       hitTest(8, 2, true); !hitTest(2, 8, true); // imaginarly 
forming a closed triangle as hitTest is concerned
+       //       lineTo(0, 10); lineTo(0, 0); // explicitly closed as a square 
now
+       //       hitTest(8, 2, true); hitTest(2, 8, true); // effectively 
forming a closed square
+       //
+       //       In the test above, permanently closing on hit-test (what this 
implementation does)
+       //       would result in a triangle and a stroke, which should fail the 
last hitTest(2,8).
+       //
+       //
+       bool point_test_local(float x, float y)
+       {
+               finalize();
+               return shape_character_def::point_test_local(x, y);
+       }
+
        /// Add a path, updating _currpath and recomputing bounds
        //
        /// TODO: make private? Only current user is BitmapMovieDefinition.

Index: server/parser/shape_character_def.h
===================================================================
RCS file: /sources/gnash/gnash/server/parser/shape_character_def.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- server/parser/shape_character_def.h 3 Oct 2007 06:52:42 -0000       1.16
+++ server/parser/shape_character_def.h 9 Nov 2007 09:31:22 -0000       1.17
@@ -5,7 +5,7 @@
 
 // Quadratic bezier outline shapes, the basis for most SWF rendering.
 
-/* $Id: shape_character_def.h,v 1.16 2007/10/03 06:52:42 strk Exp $ */
+/* $Id: shape_character_def.h,v 1.17 2007/11/09 09:31:22 strk Exp $ */
 
 #ifndef GNASH_SHAPE_CHARACTER_DEF_H
 #define GNASH_SHAPE_CHARACTER_DEF_H
@@ -43,7 +43,7 @@
                virtual ~shape_character_def();
 
                virtual void    display(character* inst);
-               bool    point_test_local(float x, float y);
+               virtual bool point_test_local(float x, float y);
 
                float   get_height_local() const;
                float   get_width_local() const;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]