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

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 23日 (水) 21:58:39 JST


Revision: 453
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=453
Author:   yoya
Date:     2011-03-23 21:58:39 +0900 (Wed, 23 Mar 2011)

Log Message:
-----------
author: yoya
setCompressLevel メソッドを追加 (呼ばない場合は今まで通り level 6)

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


-------------- next part --------------
Modified: trunk/src/php_swfed.c
===================================================================
--- trunk/src/php_swfed.c	2011-03-23 12:58:03 UTC (rev 452)
+++ trunk/src/php_swfed.c	2011-03-23 12:58:39 UTC (rev 453)
@@ -65,9 +65,9 @@
     PHP_ME(swfed,  replaceTagData, NULL, 0)
     PHP_ME(swfed,  getTagContentsByCID, NULL, 0)
     PHP_ME(swfed,  replaceTagContentsByCID, NULL, 0)
+
     PHP_ME(swfed,  getShapeData, NULL, 0)
     PHP_ME(swfed,  replaceShapeData, NULL, 0)
-    
     PHP_ME(swfed,  setShapeAdjustMode, NULL, 0)
     PHP_ME(swfed,  getShapeIdListByBitmapRef, NULL, 0)
     PHP_ME(swfed,  getBitmapSize, NULL, 0)
@@ -87,6 +87,8 @@
     PHP_ME(swfed,  disasmActionData, NULL, 0)
     PHP_ME(swfed,  setActionVariables, NULL, 0)
     PHP_ME(swfed,  replaceMovieClip, NULL, 0)
+
+    PHP_ME(swfed,  setCompressLevel, NULL, 0)
     PHP_ME(swfed,  swfInfo, NULL, 0)
     {NULL, NULL, NULL}	/* Must be the last line in swfed_functions[] */
 };
@@ -1158,6 +1160,17 @@
     RETURN_TRUE;
 }
 
+PHP_METHOD(swfed, setCompressLevel) {
+    unsigned long compress_level = 6 ; // Z_DEFAULT_COMPRESSION
+    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+                              "l", &compress_level) == FAILURE) {
+        RETURN_FALSE;
+    }
+    swf_object_t *swf = get_swf_object(getThis() TSRMLS_CC);
+    swf->compress_level = compress_level;
+    RETURN_TRUE;
+}
+
 static swf_object_t  *get_swf_object(zval *obj TSRMLS_DC) {
 //    zval *data, **tmp;
     zval **tmp = NULL;

Modified: trunk/src/php_swfed.h
===================================================================
--- trunk/src/php_swfed.h	2011-03-23 12:58:03 UTC (rev 452)
+++ trunk/src/php_swfed.h	2011-03-23 12:58:39 UTC (rev 453)
@@ -82,6 +82,7 @@
 PHP_METHOD(swfed, setActionVariables);
 PHP_METHOD(swfed, replaceMovieClip);
 PHP_METHOD(swfed, swfInfo);
+PHP_METHOD(swfed, setCompressLevel);
 
 /* 
   	Declare any global variables you may need between the BEGIN



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