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

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 1月 13日 (水) 19:53:31 JST


Revision: 183
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=183
Author:   yoya
Date:     2010-01-13 19:53:31 +0900 (Wed, 13 Jan 2010)

Log Message:
-----------
author: yoya
- print表示を TWIPS から pixel 単位変更
- コメントを少し追加

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


-------------- next part --------------
Modified: trunk/src/swf_matrix.c
===================================================================
--- trunk/src/swf_matrix.c	2009-08-27 17:00:28 UTC (rev 182)
+++ trunk/src/swf_matrix.c	2010-01-13 10:53:31 UTC (rev 183)
@@ -68,18 +68,18 @@
     printf("has_scale=%d\n", matrix->has_scale);
     if (matrix->has_scale) {
         print_indent(indent_depth);
-        printf("scale_(x,y)=(%lu,%lu)\n",
-               matrix->scale_x, matrix->scale_y);
+        printf("scale_(x,y)=(%5.3f,%5.3f)\n",
+               matrix->scale_x / 65536.0, matrix->scale_y / 65536.0);
     }
     print_indent(indent_depth);
     printf("has_rotate=%d\n", matrix->has_scale);
     if (matrix->has_rotate) {
         print_indent(indent_depth);
         printf("rotate_(x,y)=(%d,%d)\n",
-               matrix->rotate_skew0, matrix->rotate_skew1);
+               matrix->rotate_skew0 / 65536.0, matrix->rotate_skew1 / 65536.0);
     }
     print_indent(indent_depth);
     printf("translate_(x,y)=(%d,%d) \n",
-           matrix->translate_x,  matrix->translate_y);
+           matrix->translate_x / SWF_TWIPS,  matrix->translate_y / SWF_TWIPS);
     return 0;
 }

Modified: trunk/src/swf_matrix.h
===================================================================
--- trunk/src/swf_matrix.h	2009-08-27 17:00:28 UTC (rev 182)
+++ trunk/src/swf_matrix.h	2010-01-13 10:53:31 UTC (rev 183)
@@ -13,13 +13,13 @@
     // char align;
     unsigned char has_scale:1;
     unsigned char scale_bits; //  : 5;
-    signed long scale_x; // : scale_bits;
-    signed long scale_y; // : scale_bits;
+    signed long scale_x; // : scale_bits; n.16 fixed point
+    signed long scale_y; // : scale_bits; n.16 fixed point
+
     unsigned has_rotate : 1;
-    
-    unsigned rotate_bits : 5; // f_has_rotate
-    signed /* fixed */ rotate_skew0; // : f_rotate_bits;
-    signed /* fixed */ rotate_skew1; // : f_rotate_bits;
+    unsigned rotate_bits; // : 5;
+    signed long rotate_skew0; // : rotate_bits; n.16 fixed point
+    signed long rotate_skew1; // : rotate_bits; n.16 fixed point
 
     signed translate_x ; // : f_rotate_bits;
     signed translate_y ; // : f_rotate_bits;



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