[Swfed-svn] swfed-svn [457] author: yoya

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 24日 (木) 18:46:36 JST


Revision: 457
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=457
Author:   yoya
Date:     2011-03-24 18:46:36 +0900 (Thu, 24 Mar 2011)

Log Message:
-----------
author: yoya
setHeaderInfo で FrameRect も弄れるようにした

Modified Paths:
--------------
    trunk/src/php_swfed.c


-------------- next part --------------
Modified: trunk/src/php_swfed.c
===================================================================
--- trunk/src/php_swfed.c	2011-03-24 09:41:50 UTC (rev 456)
+++ trunk/src/php_swfed.c	2011-03-24 09:46:36 UTC (rev 457)
@@ -345,6 +345,8 @@
     }
     swf = get_swf_object(getThis() TSRMLS_CC);
     header_table = Z_ARRVAL_P(header_info);
+
+    // FWS or CWS
     if (zend_hash_find(header_table, "compress", sizeof("compress"), (void**)&tmp) == SUCCESS) {
         convert_to_boolean_ex(tmp);
         if (Z_LVAL_PP(tmp) != 0) {
@@ -354,10 +356,29 @@
         }
     }
 
+    // Version
     if (zend_hash_find(header_table, "version", sizeof("version"), (void**)&tmp) == SUCCESS) {
         convert_to_long_ex(tmp);
         swf->header.version = Z_LVAL_PP(tmp);
     }
+
+    // FrameRect
+    if (zend_hash_find(header_table, "x_min", sizeof("x_min"), (void**)&tmp) == SUCCESS) {
+        convert_to_long_ex(tmp);
+        swf->header_movie.frame_size.x_min = Z_LVAL_PP(tmp) * SWF_TWIPS;
+    }
+    if (zend_hash_find(header_table, "y_min", sizeof("y_min"), (void**)&tmp) == SUCCESS) {
+        convert_to_long_ex(tmp);
+        swf->header_movie.frame_size.y_min = Z_LVAL_PP(tmp) * SWF_TWIPS;
+    }
+    if (zend_hash_find(header_table, "x_max", sizeof("x_max"), (void**)&tmp) == SUCCESS) {
+        convert_to_long_ex(tmp);
+        swf->header_movie.frame_size.x_max = Z_LVAL_PP(tmp) * SWF_TWIPS;
+    }
+    if (zend_hash_find(header_table, "y_max", sizeof("y_max"), (void**)&tmp) == SUCCESS) {
+        convert_to_long_ex(tmp);
+        swf->header_movie.frame_size.y_max = Z_LVAL_PP(tmp) * SWF_TWIPS;
+    }
     RETURN_TRUE;
 }
 



Swfed-svn メーリングリストの案内
Back to archive index