[Swfed-svn] swfed-svn [493] 変換行列の表示に TWIPS 補正をかけた

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 31日 (木) 18:37:25 JST


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

Log Message:
-----------
変換行列の表示に TWIPS 補正をかけた

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


-------------- next part --------------
Modified: trunk/src/swf_matrix.c
===================================================================
--- trunk/src/swf_matrix.c	2011-03-30 09:29:01 UTC (rev 492)
+++ trunk/src/swf_matrix.c	2011-03-31 09:37:24 UTC (rev 493)
@@ -82,21 +82,23 @@
     print_indent(indent_depth);
     if (matrix->has_scale) {
         printf("scale=(%.3f,%.3f):bits=%u  ",
-               matrix->scale_x / 65536.0, matrix->scale_y / 65536.0,
+               matrix->scale_x / 65536.0 / SWF_TWIPS,
+	       matrix->scale_y / 65536.0 / SWF_TWIPS,
                matrix->scale_bits);
     } else {
         printf("(has_scale=no)  ");
     }
     if (matrix->has_rotate) {
         printf("rotate=(%.3f,%.3f)bits=%u\n",
-               matrix->rotate_skew0 / 65536.0, matrix->rotate_skew1 / 65536.0,
+               matrix->rotate_skew0 / 65536.0 / SWF_TWIPS,
+	       matrix->rotate_skew1 / 65536.0 / SWF_TWIPS,
                matrix->rotate_bits);
     } else {
         printf("(has_rotate=no)\n");
     }
     print_indent(indent_depth);
     printf("translate=(%.2f,%.2f):bits=%u\n",
-           (float) matrix->translate_x / SWF_TWIPS, 
+           (float) matrix->translate_x / SWF_TWIPS,
 	   (float) matrix->translate_y / SWF_TWIPS,
            matrix->translate_bits);
     return 0;

Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2011-03-30 09:29:01 UTC (rev 492)
+++ trunk/src/swf_object.c	2011-03-31 09:37:24 UTC (rev 493)
@@ -1187,6 +1187,7 @@
                   }
               }
               if (isShapeTag(tag_no)) {
+		fprintf(stderr, "XXX: isShapeTag: cid=%d\n", cid);
 		  int *bitmap_id_list, bitmap_id_list_num;
 		  bitmap_id_list = swf_tag_shape_bitmap_get_refcid_list(tag, &bitmap_id_list_num);
 		  if (bitmap_id_list) {
@@ -1194,6 +1195,7 @@
 		      for (i = 0 ; i < bitmap_id_list_num; i++) {
 		          int bitmap_id = bitmap_id_list[i];
 			  int to_bitmap_id = trans_table_get(cid_trans_table, bitmap_id);
+			fprintf(stderr, "   : (%d) bitmap_id=%d => %d\n", i,  bitmap_id, to_bitmap_id);
 			  if ((to_bitmap_id > 0) && (bitmap_id != to_bitmap_id)) {
 			      swf_tag_shape_bitmap_replace_refcid_list(tag, bitmap_id, to_bitmap_id);
 			  }



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