gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/character.h server/dlist...


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog server/character.h server/dlist...
Date: Wed, 18 Apr 2007 13:57:25 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/04/18 13:57:25

Modified files:
        .              : ChangeLog 
        server         : character.h dlist.cpp 
        server/swf     : PlaceObject2Tag.cpp 

Log message:
        fix masks bug; introduce isMask()

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2909&r2=1.2910
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.68&r2=1.69
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/PlaceObject2Tag.cpp?cvsroot=gnash&r1=1.2&r2=1.3

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.2909
retrieving revision 1.2910
diff -u -b -r1.2909 -r1.2910
--- ChangeLog   18 Apr 2007 13:47:24 -0000      1.2909
+++ ChangeLog   18 Apr 2007 13:57:25 -0000      1.2910
@@ -1,3 +1,8 @@
+2007-04-18 Udo Giacomozzi <address@hidden>
+
+       * server/character.h, server/dlist.cpp, server/swf/PlaceObject2Tag.cpp:
+         make masks work again, introduce isMask()   
+               
 2007-04-18 Martin Guy <address@hidden>
 
        * configure.ac: Introduce HAVE_LONG_TIMEZONE if extern long timezone

Index: server/character.h
===================================================================
RCS file: /cvsroot/gnash/gnash/server/character.h,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- server/character.h  18 Apr 2007 13:24:44 -0000      1.68
+++ server/character.h  18 Apr 2007 13:57:25 -0000      1.69
@@ -18,7 +18,7 @@
 //
 //
 
-/* $Id: character.h,v 1.68 2007/04/18 13:24:44 strk Exp $ */
+/* $Id: character.h,v 1.69 2007/04/18 13:57:25 udog Exp $ */
 
 #ifndef GNASH_CHARACTER_H
 #define GNASH_CHARACTER_H
@@ -242,6 +242,11 @@
     ///
     static const int staticDepthOffset = -16384;
 
+    /// This value is used for m_clip_depth when the value has no meaning, ie.
+    /// the character is not a mask. Depths below -16384 are illegal, so this
+    /// value should not collide with real depths.  
+    static const int noClipDepthValue = -1000000;
+
     ~character();
 
     character(character* parent, int id)
@@ -332,9 +337,22 @@
       m_ratio = f;       
     }
 
+    /// Returns the clipping depth (if any) of this character. The parameter 
is 
+    /// tells us to use the character as a mask for all the objects contained 
+    /// in the display list from m_depth to m_clipping_depth inclusive.
+    /// 
+    /// The value returned by get_clip_depth() is only valid when isMask()
+    /// returns true!
+    ///  
     int get_clip_depth() const { return m_clip_depth; }
     void set_clip_depth(int d) { m_clip_depth = d; }
 
+    /// Returns true when the character (and it's childs) are used as a mask
+    /// for other characters. isMask() does *not* return true when one of it's
+    /// parents is a mask and the character itself is not.
+    ///   
+    bool isMask() const { return m_clip_depth!=noClipDepthValue; }
+
     virtual void set_name(const char* name) { _name = name; }
 
     const std::string& get_name() const { return _name; }

Index: server/dlist.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/dlist.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- server/dlist.cpp    18 Apr 2007 09:35:42 -0000      1.59
+++ server/dlist.cpp    18 Apr 2007 13:57:25 -0000      1.60
@@ -646,7 +646,7 @@
                }
 
                // check whether this object should become mask
-               if (ch->get_clip_depth() > 0)
+               if (ch->isMask())
                {
                        //log_msg(_("begin submit mask"));
                        render::begin_submit_mask();
@@ -657,7 +657,7 @@
                // if this object should have become a mask,
                // inform the renderer that it now has all
                // information about it
-               if (ch->get_clip_depth() > 0)
+               if (ch->isMask())
                {
                        //log_msg(_("end submit mask"));
                        render::end_submit_mask();

Index: server/swf/PlaceObject2Tag.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/swf/PlaceObject2Tag.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/swf/PlaceObject2Tag.cpp      11 Apr 2007 17:54:22 -0000      1.2
+++ server/swf/PlaceObject2Tag.cpp      18 Apr 2007 13:57:25 -0000      1.3
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: PlaceObject2Tag.cpp,v 1.2 2007/04/11 17:54:22 bjacques Exp $ */
+/* $Id: PlaceObject2Tag.cpp,v 1.3 2007/04/18 13:57:25 udog Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -229,7 +229,10 @@
 
        if (has_name) m_name = in->read_string();
 
-       if (has_clip_bracket) m_clip_depth = 
in->read_u16()+character::staticDepthOffset; 
+       if (has_clip_bracket) 
+               m_clip_depth = in->read_u16()+character::staticDepthOffset;
+       else 
+               m_clip_depth = character::noClipDepthValue; 
 
        if (has_actions)
        {




reply via email to

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