[Swfed-svn] swfed-svn [127] DefineShape で必要な構造定義 ( まだ途中 )

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 5月 19日 (火) 02:36:32 JST


Revision: 127
          http://svn.sourceforge.jp/view?root=swfed&view=rev&rev=127
Author:   yoya
Date:     2009-05-19 02:36:32 +0900 (Tue, 19 May 2009)

Log Message:
-----------
DefineShape で必要な構造定義 (まだ途中)

Modified Paths:
--------------
    trunk/src/swf_tag_shape.h

Added Paths:
-----------
    trunk/src/swf_fill_style.h
    trunk/src/swf_fill_style_array.h
    trunk/src/swf_line_style.h
    trunk/src/swf_line_style_array.h
    trunk/src/swf_morph_shape_with_style.h
    trunk/src/swf_shape_record.h
    trunk/src/swf_styles.h
    trunk/src/swf_styles_count.h


-------------- next part --------------
Added: trunk/src/swf_fill_style.h
===================================================================
--- trunk/src/swf_fill_style.h	                        (rev 0)
+++ trunk/src/swf_fill_style.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,26 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_FILL_STYLE_H__
+#define __SWF_FILL_STYLE_H__
+
+// #include "swf_fill_style_solid.h"
+// #include "swf_fill_style_gradient.h"
+// #include "swf_fill_style_bitmap.h"
+
+typedef union swf_fill_style_ {
+    unsigned char type;
+    double  dummy;
+//    swf_fill_style_solid_t    solid;
+//    swf_fill_style_gradient_t gradient;
+//    swf_fill_style_bitmap_t   bitmap;
+} swf_fill_style_t;
+
+extern int swf_fill_style_parse(bitstream_t *bs, swf_fill_style_t *color);
+extern int swf_fill_style_build(bitstream_t *bs, swf_fill_style_t *color);
+extern int swf_fill_style_print(swf_fill_style_t *color);
+
+#endif /* __SWF_FILL_STYLE_H__ */

Added: trunk/src/swf_fill_style_array.h
===================================================================
--- trunk/src/swf_fill_style_array.h	                        (rev 0)
+++ trunk/src/swf_fill_style_array.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,21 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_FILL_STYLE_ARRAY_H__
+#define __SWF_FILL_STYLE_ARRAY_H__
+
+#include "swf_fill_style.h"
+
+typedef struct swf_fill_style_array_ {
+    unsigned short count;
+    swf_fill_style_t *fill_style;
+} swf_fill_style_array_t;
+
+extern int swf_fill_style_array_parse(bitstream_t *bs, swf_fill_style_array_t *color);
+extern int swf_fill_style_array_build(bitstream_t *bs, swf_fill_style_array_t *color);
+extern int swf_fill_style_array_print(swf_fill_style_array_t *color);
+
+#endif /* __SWF_FILL_STYLE_ARRAY_H__ */

Added: trunk/src/swf_line_style.h
===================================================================
--- trunk/src/swf_line_style.h	                        (rev 0)
+++ trunk/src/swf_line_style.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,26 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_LINE_STYLE_H__
+#define __SWF_LINE_STYLE_H__
+
+#include "swf_rgba.h"
+
+typedef union swf_line_style_ {
+    // DefineMorphShape
+    unsigned short width; // twips
+    unsigned short width_morph; // twips
+    swf_rgba_t rgba;
+    swf_rgba_t rgba_morph;
+    // DefineShape4, DefinePhophShape2
+//    ...
+} swf_line_style_t;
+
+extern int swf_line_style_parse(bitstream_t *bs, swf_line_style_t *color);
+extern int swf_line_style_build(bitstream_t *bs, swf_line_style_t *color);
+extern int swf_line_style_print(swf_line_style_t *color);
+
+#endif /* __SWF_LINE_STYLE_H__ */

Added: trunk/src/swf_line_style_array.h
===================================================================
--- trunk/src/swf_line_style_array.h	                        (rev 0)
+++ trunk/src/swf_line_style_array.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,21 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_LINE_STYLE_ARRAY_H__
+#define __SWF_LINE_STYLE_ARRAY_H__
+
+#include "swf_line_style.h"
+
+typedef struct swf_line_style_array_ {
+    unsigned short count;
+    swf_line_style_t *line_style;
+} swf_line_style_array_t;
+
+extern int swf_line_style_array_parse(bitstream_t *bs, swf_line_style_array_t *color);
+extern int swf_line_style_array_build(bitstream_t *bs, swf_line_style_array_t *color);
+extern int swf_line_style_array_print(swf_line_style_array_t *color);
+
+#endif /* __SWF_LINE_STYLE_ARRAY_H__ */

Added: trunk/src/swf_morph_shape_with_style.h
===================================================================
--- trunk/src/swf_morph_shape_with_style.h	                        (rev 0)
+++ trunk/src/swf_morph_shape_with_style.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,27 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_MORPH_SHAPE_WITH_STYLE_H__
+#define __SWF_MORPH_SHAPE_WITH_STYLE_H__
+
+#include "swf_styles.h"
+#include "swf_shape_record.h"
+#include "swf_styles_count.h"
+
+typedef struct swf_morph_shape_with_style_ {
+    swf_styles_t       styles;
+    swf_shape_record_t *shape_records;
+    // char align;
+    swf_styles_count_t styles_count;
+    swf_shape_record_t *shape_records_morph;
+    
+} swf_morph_shape_with_style_t;
+
+extern int swf_morph_shape_with_style_parse(bitstream_t *bs, swf_morph_shape_with_style_t *color);
+extern int swf_morph_shape_with_style_build(bitstream_t *bs, swf_morph_shape_with_style_t *color);
+extern int swf_morph_shape_with_style_print(swf_morph_shape_with_style_t *color);
+
+#endif /* __SWF_MORPH_SHAPE_WITH_STYLE_H__ */

Added: trunk/src/swf_shape_record.h
===================================================================
--- trunk/src/swf_shape_record.h	                        (rev 0)
+++ trunk/src/swf_shape_record.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,20 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_SHAPE_RECORD_H__
+#define __SWF_SHAPE_RECORD_H__
+
+#include "swf_shape_record.h"
+
+typedef struct swf_shape_record_ {
+    int dummy; // 
+} swf_shape_record_t;
+
+extern int swf_shape_record_parse(bitstream_t *bs, swf_shape_record_t *color);
+extern int swf_shape_record_build(bitstream_t *bs, swf_shape_record_t *color);
+extern int swf_shape_record_print(swf_shape_record_t *color);
+
+#endif /* __SWF_SHAPE_RECORD_H__ */

Added: trunk/src/swf_styles.h
===================================================================
--- trunk/src/swf_styles.h	                        (rev 0)
+++ trunk/src/swf_styles.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,24 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_STYLES_H__
+#define __SWF_STYLES_H__
+
+#include "swf_fill_style_array.h"
+#include "swf_line_style_array.h"
+#include "swf_styles_count.h"
+
+typedef struct swf_styles_ {
+    swf_fill_style_array_t fill_styles;
+    swf_line_style_array_t line_styles;
+    swf_styles_count_t styles_count;
+} swf_styles_t;
+
+extern int swf_styles_parse(bitstream_t *bs, swf_styles_t *color);
+extern int swf_styles_build(bitstream_t *bs, swf_styles_t *color);
+extern int swf_styles_print(swf_styles_t *color);
+
+#endif /* __SWF_STYLES_H__ */

Added: trunk/src/swf_styles_count.h
===================================================================
--- trunk/src/swf_styles_count.h	                        (rev 0)
+++ trunk/src/swf_styles_count.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -0,0 +1,19 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya****@awm*****                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#ifndef __SWF_STYLES_COUNT_H__
+#define __SWF_STYLES_COUNT_H__
+
+typedef struct swf_styles_count_ {
+    unsigned char fill_bits_count:4;
+    unsigned char line_bits_count:4;
+} swf_styles_count_t;
+
+extern int swf_styles_count_parse(bitstream_t *bs, swf_styles_count_t *color);
+extern int swf_styles_count_build(bitstream_t *bs, swf_styles_count_t *color);
+extern int swf_styles_count_print(swf_styles_count_t *color);
+
+#endif /* __SWF_STYLES_COUNT_H__ */

Modified: trunk/src/swf_tag_shape.h
===================================================================
--- trunk/src/swf_tag_shape.h	2009-05-18 16:48:54 UTC (rev 126)
+++ trunk/src/swf_tag_shape.h	2009-05-18 17:36:32 UTC (rev 127)
@@ -8,7 +8,7 @@
 #define __SWF_TAG_SHAPE__H__
 
 #include "swf_rect.h"
-// #include "swf_morph_shape_with_style.h"
+#include "swf_morph_shape_with_style.h"
 // #include "swf_shape_with_style.h"
 #include "swf_tag.h"
 



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