gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp ...


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog server/edit_text_character.cpp ...
Date: Fri, 20 Jul 2007 16:42:36 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/07/20 16:42:36

Modified files:
        .              : ChangeLog 
        server         : edit_text_character.cpp edit_text_character.h 

Log message:
        server/edit_text_character.{h,cpp}: special get_world_cxform() handler 
to make input fields opaque for device fonts (currently no effect, since it 
can't be detected yet)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3777&r2=1.3778
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.83&r2=1.84
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.h?cvsroot=gnash&r1=1.37&r2=1.38

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.3777
retrieving revision 1.3778
diff -u -b -r1.3777 -r1.3778
--- ChangeLog   20 Jul 2007 16:11:02 -0000      1.3777
+++ ChangeLog   20 Jul 2007 16:42:35 -0000      1.3778
@@ -2,6 +2,9 @@
 
        * server/edit_text_character.cpp: fix background and cxform for
          text fields
+       * server/edit_text_character.{h,cpp}: special get_world_cxform() 
+         handler to make input fields opaque for device fonts (currently
+    no effect, since it can't be detected yet)
 
 2007-07-20 Sandro Santilli <address@hidden>
 

Index: server/edit_text_character.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- server/edit_text_character.cpp      20 Jul 2007 16:13:55 -0000      1.83
+++ server/edit_text_character.cpp      20 Jul 2007 16:42:35 -0000      1.84
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: edit_text_character.cpp,v 1.83 2007/07/20 16:13:55 udog Exp $ */
+/* $Id: edit_text_character.cpp,v 1.84 2007/07/20 16:42:35 udog Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -464,19 +464,13 @@
                rgba borderColor = drawBorder ? getBorderColor() : 
rgba(0,0,0,0);
                rgba backgroundColor = drawBackground ? getBackgroundColor() : 
rgba(0,0,0,0);
 
-               if ( 1 ) // should be if ! isDynamic to be PP-compatible (or is 
it about device font? to be tested)
-                        // Currently disabled due to what looks like a bug in 
color transform
-               {
                        cxform  cx = get_world_cxform();
-                       log_debug("world cxform for textfield %s: %s", 
getTargetPath().c_str(), cx.toString().c_str());
                        
                        if (drawBorder)
                                borderColor = cx.transform(borderColor);
                         
                        if (drawBackground)
                                backgroundColor = cx.transform(backgroundColor);
-               }
-
 
                render::draw_poly( &coords[0], 4, backgroundColor, borderColor 
);
                
@@ -1442,6 +1436,20 @@
        }
 }
 
+cxform 
+edit_text_character::get_world_cxform() const
+{
+  cxform cf = character::get_world_cxform();
+  
+  if ( 0 /* if using a device font (PP compatibility, TODO) */ ) {
+    // set alpha to default values to make the text field opaque
+    cf.m_[3][0] = 1.0f;
+    cf.m_[3][1] = 0.0f;
+  }
+  
+  return cf;
+}
+
 static as_value
 textfield_background_getset(const fn_call& fn)
 {

Index: server/edit_text_character.h
===================================================================
RCS file: /cvsroot/gnash/gnash/server/edit_text_character.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- server/edit_text_character.h        18 Jul 2007 03:35:38 -0000      1.37
+++ server/edit_text_character.h        20 Jul 2007 16:42:35 -0000      1.38
@@ -212,6 +212,9 @@
        ///
        void registerTextVariable();
 
+       // Text fields need to handle cxform specially 
+       cxform  get_world_cxform() const;
+
        /// The flag keeping status of TextVariable registration
        //
        /// It will be set to true if there's no need to register




reply via email to

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