OSDN Git Service

DefineShape で必要な構造定義 (まだ途中)
authoryoya <yoya@7c90b180-03d5-4157-b861-58a559ae9d1e>
Mon, 18 May 2009 17:36:32 +0000 (17:36 +0000)
committeryoya <yoya@7c90b180-03d5-4157-b861-58a559ae9d1e>
Mon, 18 May 2009 17:36:32 +0000 (17:36 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/swfed/trunk@127 7c90b180-03d5-4157-b861-58a559ae9d1e

src/swf_fill_style.h [new file with mode: 0644]
src/swf_fill_style_array.h [new file with mode: 0644]
src/swf_line_style.h [new file with mode: 0644]
src/swf_line_style_array.h [new file with mode: 0644]
src/swf_morph_shape_with_style.h [new file with mode: 0644]
src/swf_shape_record.h [new file with mode: 0644]
src/swf_styles.h [new file with mode: 0644]
src/swf_styles_count.h [new file with mode: 0644]
src/swf_tag_shape.h

diff --git a/src/swf_fill_style.h b/src/swf_fill_style.h
new file mode 100644 (file)
index 0000000..b523c29
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_fill_style_array.h b/src/swf_fill_style_array.h
new file mode 100644 (file)
index 0000000..600db47
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_line_style.h b/src/swf_line_style.h
new file mode 100644 (file)
index 0000000..33b6b7a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_line_style_array.h b/src/swf_line_style_array.h
new file mode 100644 (file)
index 0000000..846adbd
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_morph_shape_with_style.h b/src/swf_morph_shape_with_style.h
new file mode 100644 (file)
index 0000000..e2465e5
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_shape_record.h b/src/swf_shape_record.h
new file mode 100644 (file)
index 0000000..dff9b87
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_styles.h b/src/swf_styles.h
new file mode 100644 (file)
index 0000000..44e042d
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
diff --git a/src/swf_styles_count.h b/src/swf_styles_count.h
new file mode 100644 (file)
index 0000000..f8279f9
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+  +----------------------------------------------------------------------+
+  | Author: yoya@awm.jp                                                  |
+  +----------------------------------------------------------------------+
+*/
+
+#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__ */
index 98ee7a9..69fe9e9 100644 (file)
@@ -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"