gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11248: Implement SWF-defined autosi


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11248: Implement SWF-defined autosize for TextFields.
Date: Mon, 13 Jul 2009 20:58:25 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11248
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-07-13 20:58:25 +0200
message:
  Implement SWF-defined autosize for TextFields.
modified:
  libcore/BitmapMovie.cpp
  libcore/BitmapMovie.h
  libcore/TextField.cpp
  libcore/swf/DefineEditTextTag.cpp
  libcore/swf/DefineEditTextTag.h
    ------------------------------------------------------------
    revno: 11247.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-13 20:15:25 +0200
    message:
      Drop override of virtual function.
    modified:
      libcore/BitmapMovie.cpp
      libcore/BitmapMovie.h
    ------------------------------------------------------------
    revno: 11247.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-13 20:32:52 +0200
    message:
      Default text height is 12 pixels (240 twips), not 1. This is used when
      there is no font associated with the TextField.
      
      Expose autosize information.
    modified:
      libcore/swf/DefineEditTextTag.cpp
      libcore/swf/DefineEditTextTag.h
    ------------------------------------------------------------
    revno: 11247.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Mon 2009-07-13 20:33:56 +0200
    message:
      Use definition autosize information.
    modified:
      libcore/TextField.cpp
=== modified file 'libcore/BitmapMovie.cpp'
--- a/libcore/BitmapMovie.cpp   2009-04-15 09:08:37 +0000
+++ b/libcore/BitmapMovie.cpp   2009-07-13 18:15:25 +0000
@@ -33,13 +33,5 @@
     placeDisplayObject(ch.get(), depth);
 }
 
-std::auto_ptr<GnashImage>
-BitmapMovie::drawToBitmap(const SWFMatrix& /* mat */, const cxform& /* cx */,
-             DisplayObject::BlendMode /* bm */, const rect& /* clipRect */,
-             bool /* smooth */)
-{
-    return std::auto_ptr<GnashImage>();
-}
-
 } // namespace gnash
 

=== modified file 'libcore/BitmapMovie.h'
--- a/libcore/BitmapMovie.h     2009-04-15 09:08:37 +0000
+++ b/libcore/BitmapMovie.h     2009-07-13 18:15:25 +0000
@@ -73,15 +73,6 @@
         return _def;
     }
        
-    /// Render this MovieClip to a GnashImage using the passed transform
-    //
-    /// @return     The GnashImage with the MovieClip drawn onto it.
-    virtual std::auto_ptr<GnashImage> drawToBitmap(
-            const SWFMatrix& mat = SWFMatrix(), 
-            const cxform& cx = cxform(),
-            DisplayObject::BlendMode bm = DisplayObject::BLENDMODE_NORMAL,
-            const rect& clipRect = rect(),
-            bool smooth = false);
 private:
        
     const BitmapMovieDefinition* const _def;

=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-07-13 07:07:26 +0000
+++ b/libcore/TextField.cpp     2009-07-13 18:33:56 +0000
@@ -142,7 +142,7 @@
     _wordWrap(def.wordWrap()),
     _html(def.html()),
     _selectable(!def.noSelect()),
-    _autoSize(autoSizeNone),
+    _autoSize(def.autoSize() ? autoSizeLeft : autoSizeNone),
     _type(def.readOnly() ? typeDynamic : typeInput),
     _bounds(def.bounds()),
     _selection(0, 0)

=== modified file 'libcore/swf/DefineEditTextTag.cpp'
--- a/libcore/swf/DefineEditTextTag.cpp 2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineEditTextTag.cpp 2009-07-13 18:32:52 +0000
@@ -189,7 +189,7 @@
        _html(false),
        _useOutlines(false),
        _fontID(-1),
-       _textHeight(1),
+       _textHeight(240),
        _maxChars(0),
        _alignment(TextField::ALIGN_LEFT),
        _leftMargin(0),

=== modified file 'libcore/swf/DefineEditTextTag.h'
--- a/libcore/swf/DefineEditTextTag.h   2009-07-13 08:06:09 +0000
+++ b/libcore/swf/DefineEditTextTag.h   2009-07-13 18:32:52 +0000
@@ -144,6 +144,10 @@
                return _border;
        }
 
+    bool autoSize() const {
+        return _autoSize;
+    }
+
        /// Word wrap requested ?
        bool wordWrap() const {
                return _wordWrap;


reply via email to

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