gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9596: Recompute matrix from paramet


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9596: Recompute matrix from parameters on update. Fixes MovieClip.as but still not potlatch.
Date: Fri, 15 Aug 2008 13:48:58 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9596
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Fri 2008-08-15 13:48:58 +0200
message:
  Recompute matrix from parameters on update. Fixes MovieClip.as but still not 
potlatch.
modified:
  libcore/character.cpp
    ------------------------------------------------------------
    revno: 9595.1.1
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-08-15 13:48:04 +0200
    message:
      Recompute matrix from scale and rotation components everytime one
      of them gets updated. Fixes MovieClip.as failing tests.
    modified:
      libcore/character.cpp
=== modified file 'libcore/character.cpp'
--- a/libcore/character.cpp     2008-08-14 21:51:05 +0000
+++ b/libcore/character.cpp     2008-08-15 11:48:04 +0000
@@ -761,9 +761,12 @@
 {
        _xscale = scale_percent;
 
-       double scale = scale_percent / 100.0;
+       double xscale = _xscale / 100.0;
+       double yscale = _yscale / 100.0;
+       double rotation = _rotation * PI / 180.0;
+
        matrix m = get_matrix();
-       m.set_x_scale(scale);
+       m.set_scale_rotation(xscale, yscale, rotation);
        set_matrix(m); // we updated the cache ourselves
 
        transformedByScript(); 
@@ -782,10 +785,14 @@
        //log_debug("_rotation: %d", rot);
        _rotation = rot;
 
-       double rotation = rot * PI / 180.0;
+       double xscale = _xscale / 100.0;
+       double yscale = _yscale / 100.0;
+       double rotation = _rotation * PI / 180.0;
+
        matrix m = get_matrix();
-       m.set_rotation(rotation);
+       m.set_scale_rotation(xscale, yscale, rotation);
        set_matrix(m); // we updated the cache ourselves
+
        transformedByScript(); 
 }
 
@@ -794,9 +801,12 @@
 {
        _yscale = scale_percent;
 
-       double scale = scale_percent / 100.0;
+       double xscale = _xscale / 100.0;
+       double yscale = _yscale / 100.0;
+       double rotation = _rotation * PI / 180.0;
+
        matrix m = get_matrix();
-       m.set_y_scale(scale);
+       m.set_scale_rotation(xscale, yscale, rotation);
        set_matrix(m); // we updated the cache ourselves
 
        transformedByScript(); 


reply via email to

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