{"id":2328,"date":"2011-04-07T15:16:58","date_gmt":"2011-04-07T06:16:58","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=2328"},"modified":"2021-04-27T15:08:49","modified_gmt":"2021-04-27T06:08:49","slug":"post2328","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/","title":{"rendered":"SWF\u30d0\u30a4\u30ca\u30ea\u7de8\u96c6\u306e\u30b9\u30b9\u30e1\u7b2c\u4e03\u56de (Shape\u57fa\u672c\u69cb\u9020)"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u958b\u767a\u306e\u3088\u3084\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f DefineShape \u30bf\u30b0\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002DefineShape \u30bf\u30b0\u306f Flash SWF \u304c\u30d9\u30af\u30bf\u30fc\u753b\u50cf\u3092\u683c\u7d0d\u3059\u308b\u30bf\u30b0\u3067\u3059\u3002<br \/>\n\u7b2c3\u56de\uff5e\u7b2c5\u56de\u3067\u3068\u308a\u3042\u3052\u305f Bitmap \u7cfb(DefineBitsJPEG, DefineBitsLossless)\u30bf\u30b0\u3068\u3001\u3053\u306e DefineShape \u30bf\u30b0\u306e\u6a5f\u80fd\u3068\u69cb\u9020\u3092\u7406\u89e3\u3059\u308c\u3070\u3001(fla \u30d5\u30a1\u30a4\u30eb\u7121\u3057\u3067\u3082) Flash \u306e\u4efb\u610f\u306e\u753b\u50cf\u3092\u597d\u304d\u306a\u3088\u3046\u306b\u7de8\u96c6\u3067\u304d\u307e\u3059\u3002<br \/>\nDefineShape \u30bf\u30b0\u306e\u5927\u307e\u304b\u306a\u6a5f\u80fd\u3068\u30d0\u30a4\u30ca\u30ea\u69cb\u9020\u3092\u7d39\u4ecb\u3057\u3066\u3001\u6700\u5f8c\u306b\u30d0\u30a4\u30ca\u30ea\u30c7\u30fc\u30bf\u3092\u7de8\u96c6\u3059\u308b PHP \u306e\u30b3\u30fc\u30c9\u3068\u52d5\u4f5c\u30b5\u30f3\u30d7\u30eb\u3092\u793a\u3059\u3002\u3068\u3044\u3063\u305f\u6d41\u308c\u3067\u9032\u3081\u307e\u3059\u3002<\/p>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_0\"> \u8aad\u307f\u89e3\u304f\u30dd\u30a4\u30f3\u30c8<\/h3>\n<ul>\n<li> \u4e00\u822c\u7684\u306a\u63cf\u753b\u30c4\u30fc\u30eb\u3067\u7d75\u3092\u66f8\u304f\u3068\u304d\u306b\u306f\u3001\u307e\u305a\u30d1\u30ec\u30c3\u30c8\u3067\u8272\u3084\u592a\u3055\u3092\u6307\u5b9a\u3057\u3066\u304b\u3089\u7dda\u3092\u5f15\u304d\u307e\u3059\u3002DefineShape \u306f\u305d\u308c\u3092\u306a\u305e\u3063\u305f\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002<\/li>\n<li> \u73fe\u5728\u306e\u30da\u30f3\u306e\u4f4d\u7f6e\u304b\u3089\u306e\u5dee\u5206\u306e\u5024\u3067\u63cf\u753b\u9818\u57df\u3092\u6307\u793a\u3059\u308b\u306e\u3067\u3001\u63cf\u753b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066 current drawing point \u3092\u6301\u3064\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li> DefineShape \u30bf\u30b0\u306f\u30b5\u30a4\u30ba\u3092\u6e1b\u3089\u3059\u70ba\u306e\u5de5\u592b\u304c\u306a\u3055\u308c\u3066\u3044\u3066\u3001\u305d\u306e\u5206\u3001\u30d3\u30c3\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u69cb\u9020\u304c\u8907\u96d1\u3067\u3059\u3002\u30d0\u30a4\u30ca\u30ea\u3092\u8aad\u3080\u306e\u306b\u6163\u308c\u3066\u3044\u306a\u3044\u3068 <del>\u89e3\u8aad\u4f5c\u696d\u304c\u3068\u3063\u3066\u3082\u697d\u3057\u3044<\/del> \u8aad\u307f\u89e3\u304f\u306e\u306b\u591a\u5c11\u6642\u9593\u304c\u304b\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/li>\n<li> Edge \u3067\u56f2\u3093\u3060\u90e8\u5206\u3092 Fill \u3067\u5b9a\u7fa9\u3055\u308c\u305f\u8272\u3084\u30d1\u30bf\u30fc\u30f3\u3067\u5857\u308b\u969b\u306b\u3001Edge \u306e\u5de6\u5074\u3092 FillStyle0, \u53f3\u5074\u3092 FillStyle1 \u3068\u3057\u3066 2 \u3064\u306e Fill \u3092\u53c2\u7167\u3057\u307e\u3059\u3002\u6050\u3089\u304f\u3001Shape \u306e\u4e2d\u3067\u3053\u308c\u304c\u4e00\u756a\u7406\u89e3\u3057\u306b\u304f\u3044\u3067\u3059\u3002(\u9014\u4e2d\u3067\u5c11\u3057\u8aac\u660e\u3057\u307e\u3059)<\/li>\n<\/ul>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_1\"> DefineShape \u30bf\u30b0\u306e\u5168\u4f53\u69cb\u6210<\/h3>\n<p>STYLE (Fill &amp; Line Styles)\u3067\u7dda(Line)\u3084\u5857\u308a(Fill)\u306e\u63cf\u753b\u306e\u8868\u73fe(\u4f55\u8272\u3067\u3069\u3093\u306a\u592a\u3055\u304b\u7b49)\u3092\u5b9a\u7fa9\u3057\u3001SHAPE (Shape Records)\u3067\u3001\u4f7f\u3046 Style \u3092\u5207\u308a\u66ff\u3048(Change)\u306a\u304c\u3089\u3001\u76f4\u7dda(Straight Edge)\u53c8\u306f\u66f2\u7dda(Curved Edge)\u3067\u63cf\u753b\u9818\u57df\u3092\u6c7a\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li> \"diagram illustrates the SHAPEWITHSTYLE structure.\" (SWF\u4ed5\u69d8\u66f8\u304b\u3089\u5f15\u7528)<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/shapewithstylestructure\/\" rel=\"attachment wp-att-2915\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/03\/SHAPEWITHSTYLEstructure.png\" alt=\"The SHAPEWITHSTYLE structure\" title=\"SHAPEWITHSTYLEstructure\" width=\"246\" height=\"329\" class=\"aligncenter size-full wp-image-2915\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/03\/SHAPEWITHSTYLEstructure.png 246w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/03\/SHAPEWITHSTYLEstructure-149x200.png 149w\" sizes=\"auto, (max-width: 246px) 100vw, 246px\" \/><\/a><\/p>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_2\"> Styles \u3068 Shape Records<\/h4>\n<p>Styles \u306b\u306f\u4ee5\u4e0b\u306e\u8868\u73fe\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\n \u7dda\u306e\u63cf\u753b\u3000(Line Styles)<\/p>\n<ul>\n<li> \u5358\u8272<\/li>\n<\/ul>\n<\/li>\n<li>\n \u5857\u308a\u306e\u63cf\u753b (Fill Styles)<\/p>\n<ul>\n<li> \u5358\u8272<\/li>\n<li> \u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3 (Gradient)<\/li>\n<li> \u30d3\u30c3\u30c8\u30de\u30c3\u30d7(\u306e\u8cbc\u308a\u4ed8\u3051) (Bitmap)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Shape Records \u306e Edge \u306b\u306f\u4ee5\u4e0b\u306e\u8868\u73fe\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li> \u76f4\u7dda (Straight Edge)<\/li>\n<li> \u66f2\u7dda (Curved Edge) - \uff12\u6b21\u30d9\u30b8\u30a8\u66f2\u7dda (2\u6b21\u306a\u306e\u3067\u30012\u6b21 B-\u30b9\u30d7\u30e9\u30a4\u30f3\u66f2\u7dda\u76f8\u5f53)<\/li>\n<\/ul>\n<p>\u4eca\u56de\u306f\u305d\u308c\u3089\u306e\u8868\u73fe\u306b\u5171\u901a\u3059\u308b\u57fa\u672c\u69cb\u9020\u3067\u3042\u308b Styles (\u63cf\u753b\u30c4\u30fc\u30eb\u306e\u30d1\u30ec\u30c3\u30c8\u306e\u3088\u3046\u306a\u3082\u306e)\u3068 Shape Records (\u63cf\u753b\u306e\u30d9\u30af\u30bf\u30fc\u30c7\u30fc\u30bf)\u306e\u95a2\u4fc2\u306b\u7d5e\u3063\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<br \/>\n(\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u3084\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u306e\u69cb\u9020\u306f\u3001\u6b21\u56de\u4ee5\u964d\u3067)<\/p>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_3\"> DefineShape \u30bf\u30b0\u306e\u7a2e\u985e<\/h3>\n<p>Flash Lite1.x\/2.x \u3067\u306f DefineShape , DefineShape2, DefineShape3, DefineMorphShape \u304c\u4f7f\u308f\u308c\u307e\u3059\u3002\u3053\u308c\u3089\u3092\u9806\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_4\"> DefineShape  \u30bf\u30b0<\/h3>\n<ul>\n<li> DefineShape \u306e\u5168\u4f53\u69cb\u9020\u3068\u3057\u3066\u306f\u3001ID \u304c\u5148\u982d\u306b\u304d\u3066\u3001\u63cf\u753b\u67a0\u3092 RECT \u3067\u5b9a\u7fa9\u3057\u3001\u305d\u306e\u5f8c\u308d\u306b STYLE \u3068 SHAPE \u304c\u7d9a\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape\/\" rel=\"attachment wp-att-3022\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape.png\" alt=\"DefineShape\u5168\u4f53\u30a4\u30e1\u30fc\u30b8\" title=\"DefineShape\" width=\"429\" height=\"347\" class=\"alignnone size-full wp-image-3022\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape.png 429w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape-247x200.png 247w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/a><\/p>\n<ul>\n<li> \u5c1a\u3001\u3053\u306e\u56f3\u306e\u30ec\u30d9\u30eb\u3067\u306f\u3001DefineShape2, DefineShape3 \u3082\u5171\u901a\u3067\u3059\u3002<\/li>\n<\/ul>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_5\"> STYLE (Fill & Line Styles)<\/h4>\n<p>\u5857\u308a(Fill)\u3068\u7dda(Line)\u306e\u63cf\u753b\u30b9\u30bf\u30a4\u30eb\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li> \u5857\u308a(Fill)\u306f TYPE \u306b\u3088\u3063\u3066\u305d\u306e\u8868\u73fe\u304c\u6c7a\u307e\u3063\u3066\u3044\u3066\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066\u30c7\u30fc\u30bf\u8981\u7d20\u3082\u304b\u308f\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_fillstyles\/\" rel=\"attachment wp-att-3034\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_FillStyles.png\" alt=\"FillStyles \u69cb\u9020\" title=\"DefineShape_FillStyles\" width=\"365\" height=\"413\" class=\"alignnone size-full wp-image-3034\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_FillStyles.png 365w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_FillStyles-176x200.png 176w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_FillStyles-353x400.png 353w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/a><\/p>\n<ul>\n<li> \u7dda(Line)\u306e\u5b9a\u7fa9\u306f\u7dda\u306e\u592a\u3055\u3068\u8272\u3060\u3051\u3067\u3059\u3002\u5358\u7d14\u3067\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_linestyles\/\" rel=\"attachment wp-att-3035\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_LineStyles.png\" alt=\"LineStyles \u306e\u69cb\u9020\" title=\"DefineShape_LineStyles\" width=\"363\" height=\"208\" class=\"alignnone size-full wp-image-3035\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_LineStyles.png 363w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_LineStyles-276x158.png 276w\" sizes=\"auto, (max-width: 363px) 100vw, 363px\" \/><\/a><\/p>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_6\"> SHAPE (NumBits & Shape Records)<\/h4>\n<p>\u4e0a\u8a18\u306e FILLSTYLE \u3084 LINESTYLE \u3092\u53c2\u7167\u3057\u3066\u3001\u305d\u308c\u3092\u3069\u306e\u4f4d\u7f6e\u306b\u63cf\u753b\u3059\u308b\u306e\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li> Shape Records \u306e\u76f4\u524d\u3067 Style \u3092\u53c2\u7167\u3059\u308b\u5024\u3092\u683c\u7d0d\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u30d3\u30c3\u30c8\u6570\u3092\u793a\u3057\u3001\u305d\u306e\u5f8c\u308d\u306b ChangeStyle, Edge, End \u306e Record \u304c\u7d9a\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_shape\/\" rel=\"attachment wp-att-3293\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_SHAPE.png\" alt=\"DefineShape SHAPE\u69cb\u9020\" title=\"DefineShape_SHAPE\" width=\"523\" height=\"176\" class=\"aligncenter size-full wp-image-3293\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_SHAPE.png 523w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_SHAPE-276x92.png 276w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<ul>\n<li> Style Change Record \u3067\u306f FillStyle0, FillStyle1, LineStyle \u3067 Style \u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53c2\u7167\u3057\u3066\u30da\u30f3\u3092\u306f\u3058\u3081\u306b\u7f6e\u304f\u5834\u6240\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002Style \u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f 1 \u6570\u3048\u3067\u30010 \u3092\u672a\u6307\u5b9a(undefined)\u3068\u3057\u3066\u6271\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_changestyle\/\" rel=\"attachment wp-att-3184\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_ChangeStyle.png\" alt=\"ChangeStyle\u69cb\u9020\" title=\"DefineShape_ChangeStyle\" width=\"527\" height=\"305\" class=\"aligncenter size-full wp-image-3184\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_ChangeStyle.png 527w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_ChangeStyle-276x159.png 276w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/a><\/p>\n<ul>\n<li>\n FillStyle0 \u3068 FillStyle1 \u306f Edge \u306e\u5411\u304d\u306e\u5de6\u5074\u3092\u5857\u308b Fill \u3068\u53f3\u5074\u3092\u5857\u308b Fill \u3092\u540c\u6642\u306b\u6307\u5b9a\u3059\u308b\u70ba\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n<ul>\n<li>  <a href=\"http:\/\/codeazur.com.br\/fitc\/HackingSWF.pdf\">http:\/\/codeazur.com.br\/fitc\/HackingSWF.pdf<\/a> \u306e\u753b\u50cf\u304c\u30a4\u30e1\u30fc\u30b8\u3057\u6613\u3044\u306e\u3067\u5f15\u7528\u3057\u307e\u3059\u3002<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/fillstyle0and1\/\" rel=\"attachment wp-att-3083\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/FILLSTYLE0and1-255x200.png\" alt=\"FillStyle0 and FillStyle1 Image\" title=\"FILLSTYLE0and1\" width=\"128\" height=\"100\" class=\"alignnone size-thumbnail wp-image-3083\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/FILLSTYLE0and1-255x200.png 255w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/FILLSTYLE0and1.png 292w\" sizes=\"auto, (max-width: 128px) 100vw, 128px\" \/><\/a><\/li>\n<li>  \u4f55\u6545\u3001\u5de6\u3068\u53f3\u306e\uff12\u3064\u3092\u6307\u5b9a\u3059\u308b\u306e\u304b\u3067\u3059\u304c\u3001Edge \u3067\u304f\u304f\u3063\u305f\u9818\u57df\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7\u3055\u305b\u305f\u5834\u5408\u306b\u4e00\u7b46\u66f8\u304d\u3067\u8868\u73fe\u3057\u6613\u3044\u3068\u3044\u3063\u305f\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\u8a73\u3057\u304f\u306f SWF \u4ed5\u69d8\u66f8(v10 spec \u3067\u3042\u308c\u3070 p137)\u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\u3002\u2193\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u56f3\u3067\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_fillstyle0_vs_fillstyle1\/\" rel=\"attachment wp-att-3086\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_fillStyle0_vs_fillStyle1-199x200.png\" alt=\"fillStyle0 vs fillStyle1\" title=\"DefineShape_fillStyle0_vs_fillStyle1\" width=\"199\" height=\"200\" class=\"aligncenter size-thumbnail wp-image-3086\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_fillStyle0_vs_fillStyle1-199x200.png 199w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_fillStyle0_vs_fillStyle1-399x400.png 399w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_fillStyle0_vs_fillStyle1.png 578w\" sizes=\"auto, (max-width: 199px) 100vw, 199px\" \/><\/a><\/p>\n<ul>\n<li> \u63cf\u753b\u3059\u308b\u9818\u57df\u3092\u6c7a\u3081\u308b\u306e\u306f\u3001Edge Records \u3067\u3059\u3002Straight Edge(\u76f4\u7dda)\u3068 Curved Edge(\u66f2\u7dda)\u306e\uff12\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_edge\/\" rel=\"attachment wp-att-3127\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_Edge.png\" alt=\"\" title=\"DefineShape_Edge\" width=\"540\" height=\"247\" class=\"aligncenter size-full wp-image-3127\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_Edge.png 540w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_Edge-276x126.png 276w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/a><\/p>\n<ul>\n<li>\n Edge \u306e\u3046\u3061 Straight Edge \u306f \u76f4\u7dda\u3092\u8868\u3059\u30ec\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<ul>\n<li>  \u73fe\u5728\u306e\u30da\u30f3\u4f4d\u7f6e\u304b\u3089\u3069\u306e\u304f\u3089\u3044\u79fb\u52d5\u3059\u308b\u304b(MoveDeltaX, MoveDeltaY)\u306e\u5024\u304c\u5165\u308a\u307e\u3059\u3002<\/li>\n<li>  \u521d\u3081\u306b\u3001MoveDeltaX, MoveDeltaY \u306e\u5024\u3092\u8868\u3059\u306e\u306b\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u30d3\u30c3\u30c8\u6570\u3092\u5165\u308c\u3066\u3001\u305d\u306e\u30d3\u30c3\u30c8\u6570\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u7d9a\u304d\u307e\u3059\u3002<\/li>\n<li>  \u6c34\u5e73\u7dda\u3084\u5782\u7dda\u306e\u5834\u5408\u306f\u3001\u5404\u3005 x \u53c8\u306f y \u306e\u307f\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3061\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_straightedge\/\" rel=\"attachment wp-att-3124\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_StraightEdge.png\" alt=\"\" title=\"DefineShape_StraightEdge\" width=\"518\" height=\"423\" class=\"aligncenter size-full wp-image-3124\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_StraightEdge.png 518w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_StraightEdge-244x200.png 244w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_StraightEdge-489x400.png 489w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/a><\/p>\n<ul>\n<li>\n Curved Edge \u306f\u66f2\u7dda\u3092\u8868\u3059\u30ec\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<ul>\n<li>  \u5236\u5fa1\u70b9\u3068\u7d42\u70b9\u306e\u5ea7\u6a19\u5024\u3092\u5dee\u5206\u3067\u6301\u3061\u307e\u3059\u3002<\/li>\n<li>  \uff12\u6b21\u30d9\u30b8\u30a8\u66f2\u7dda\u3068\u3057\u3066\u63cf\u753b\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_curvededge\/\" rel=\"attachment wp-att-3123\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_CurvedEdge.png\" alt=\"\" title=\"DefineShape_CurvedEdge\" width=\"536\" height=\"209\" class=\"aligncenter size-full wp-image-3123\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_CurvedEdge.png 536w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_CurvedEdge-276x107.png 276w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_7\"> DefineShape2 \u30bf\u30b0<\/h3>\n<p>DefineShape \u306f Style \u3092 0xff (=255) \u500b\u307e\u3067\u3057\u304b\u6301\u3066\u307e\u305b\u3093\u304c\u3001DefineShape2 \u3067\u306f 0xffff (=65535)\u500b\u307e\u3067\u4fdd\u6301\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001Shape Records \u306e\u9014\u4e2d\u3067\u65b0\u3057\u3044 Styles \u3092\u518d\u5b9a\u7fa9\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002<br \/>\n\u521d\u3081\u306b\u5168 Styles \u3092\u7f6e\u3051\u3070\u30b7\u30f3\u30d7\u30eb\u306a\u306e\u306b\u3068\u601d\u3044\u307e\u3059\u304c\u3001Change Record \u4e2d\u3067 Styles \u3092\u6307\u3057\u793a\u3059 Index \u306e\u5024\u30d5\u30a3\u30fc\u30eb\u30c9\u9577\u304c\u53ef\u5909(NumFillBits, NumLineBits)\u306a\u306e\u3067\u3001Shape Records \u306e\u9014\u4e2d\u3067\u5fc5\u8981\u306b\u306a\u3063\u305f\u6642\u70b9\u3067 Styles \u3092\u518d\u5b9a\u7fa9\u3057\u305f\u65b9\u304c\u5168\u4f53\u3068\u3057\u3066\u306e\u30b5\u30a4\u30ba\u304c\u5c11\u306a\u304f\u3066\u6e08\u3080\u4e8b\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_8\"> STYLE (Fill & Line Styles)<\/h4>\n<p>DefineShape \u3068\u307b\u307c\u540c\u3058\u3067\u3059\u304c\u3001Style \u6570\u306e\u30ab\u30a6\u30f3\u30bf\u304c\u7570\u306a\u308a\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape2_styles\/\" rel=\"attachment wp-att-3172\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_Styles.png\" alt=\"\" title=\"DefineShape2_Styles\" width=\"436\" height=\"404\" class=\"aligncenter size-full wp-image-3172\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_Styles.png 436w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_Styles-215x200.png 215w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_Styles-431x400.png 431w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/a><\/p>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_9\"> SHAPE (NumBits & Shape Records)<\/h4>\n<ul>\n<li> NumFillBits, NumLineBits \u306b\u7d9a\u3044\u3066 Shape Records \u304c\u4e26\u3076\u3001SHAPE \u306e\u57fa\u672c\u69cb\u9020\u306f DefineShape \u3068\u540c\u69d8\u3067\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape_shape\/\" rel=\"attachment wp-att-3293\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_SHAPE.png\" alt=\"DefineShape SHAPE\u69cb\u9020\" title=\"DefineShape_SHAPE\" width=\"523\" height=\"176\" class=\"aligncenter size-full wp-image-3293\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_SHAPE.png 523w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape_SHAPE-276x92.png 276w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<ul>\n<li> Change Records \u306e 2bit \u76ee\u304c StateNewStyles \u30d5\u30e9\u30b0\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30e9\u30b0\u3092 1 \u306b\u3059\u308b\u4e8b\u3067\u3001Styles \u3092\u518d\u5b9a\u7fa9\u51fa\u6765\u307e\u3059\u3002\u305d\u3053\u304b\u3089\u5f8c\u308d\u306e Shape Records \u306f \u3053\u306e(\u524d\u306e Styles \u3092\u5fd8\u308c\u3066) \u65b0\u3057\u3044 Styles \u3092\u53c2\u7167\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape2_changestyles\/\" rel=\"attachment wp-att-3133\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_ChangeStyles.png\" alt=\"\" title=\"DefineShape2_ChangeStyles\" width=\"605\" height=\"453\" class=\"aligncenter size-full wp-image-3133\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_ChangeStyles.png 605w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_ChangeStyles-267x200.png 267w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape2_ChangeStyles-534x400.png 534w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<ul>\n<li> Styles \u304c\u5909\u308f\u308c\u3070\u3001Styles \u3092\u53c2\u7167\u3059\u308b\u5024\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30d3\u30c3\u30c8\u6570\u3082\u3042\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001NumFillBits, NumLineBits \u3082\u518d\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_10\"> DefineShape3 \u30bf\u30b0<\/h3>\n<ul>\n<li> \u900f\u660e\u5ea6(alpha channel)\u5bfe\u5fdc\u3067\u3059\u3002DefineShape2 \u306e STYLE \u306f\u8272\u3092 RGB \u306e 24 bit \u3067\u8868\u73fe\u3057\u307e\u3059\u304c\u3001\u305d\u308c\u3092 RGBA \u306e 32 bit \u306b\u62e1\u5f35\u3057\u307e\u3059\u3002\u305d\u308c\u3060\u3051\u306e\u9055\u3044\u3067\u3059\u3002<\/li>\n<\/ul>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_11\"> STYLE (Fill & Line Styles)<\/h4>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape3_fillstyles-2\/\" rel=\"attachment wp-att-3237\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_FillStyles1.png\" alt=\"\" title=\"DefineShape3_FillStyles\" width=\"464\" height=\"423\" class=\"aligncenter size-full wp-image-3237\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_FillStyles1.png 464w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_FillStyles1-219x200.png 219w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_FillStyles1-438x400.png 438w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/a><br \/>\n<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/defineshape3_linestyle-2\/\" rel=\"attachment wp-att-3238\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_LineStyle1.png\" alt=\"\" title=\"DefineShape3_LineStyle\" width=\"428\" height=\"224\" class=\"aligncenter size-full wp-image-3238\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_LineStyle1.png 428w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineShape3_LineStyle1-276x144.png 276w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/a><\/p>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_12\"> SHAPE (Shape Records)<\/h4>\n<ul>\n<li> NewStyles \u3067\u5b9a\u7fa9\u3057\u76f4\u3059 STYLE \u306e\u8272\u304c RGBA \u3067\u3042\u308b\u4e8b\u4ee5\u5916\u306f\u3001DefineShape2 \u3068\u540c\u3058\u3067\u3059\u3002<\/li>\n<\/ul>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_13\"> DefineMorphShape \u30bf\u30b0<\/h3>\n<ul>\n<li> \u60c5\u5831\u8981\u7d20\u306e\u7a2e\u985e\u306f DefineShape3 \u3068\u307b\u307c\u540c\u3058\u3067\u3001Morph \u958b\u59cb\u6642\u3068\u7d42\u4e86\u6642\u3068\u3067\uff12\u91cd\u306b Styles \u3068 Shape Records(Edges) \u3092\u6301\u3061\u307e\u3059\u3002<\/li>\n<li> \u958b\u59cb\u3068\u7d42\u4e86\u3067 Edge \u306e\u6570\u304c\u5404\u3005\u540c\u3058\u3067\u3001\u7d42\u4e86\u6642\u306e Edge \u306b ChangeStyle \u3092\u542b\u3081\u306a\u3044\u7b49\u306e\u7e1b\u308a\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li> DefineMorphShape \u3067\u72ec\u7279\u306a\u306e\u306f Offset \u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002 Flash Player \u306f\u3001\u3053\u306e Offset \u3092\u5143\u306b EndEdges \u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u70ba\u3001DefineMorphShape \u3092\u7de8\u96c6\u3057\u305f\u969b\u306b\u306f\u4f75\u305b\u3066 Offset \u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u66f4\u65b0\u3057\u306a\u3044\u3068\u6b63\u3057\u304f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/li>\n<\/ul>\n<p><a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/definemorphshape-2\/\" rel=\"attachment wp-att-3247\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape1.png\" alt=\"\" title=\"DefineMorphShape\" width=\"611\" height=\"367\" class=\"aligncenter size-full wp-image-3247\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape1.png 611w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape1-276x165.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape1-600x360.png 600w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/a><br \/>\n<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/definemorphshape_morphfillstyles-5\/\" rel=\"attachment wp-att-3248\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape_MorphFillStyles4.png\" alt=\"\" title=\"DefineMorphShape_MorphFillStyles\" width=\"455\" height=\"405\" class=\"aligncenter size-full wp-image-3248\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape_MorphFillStyles4.png 455w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape_MorphFillStyles4-224x200.png 224w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/DefineMorphShape_MorphFillStyles4-449x400.png 449w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/a><\/p>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_14\"> PHP \u3067\u51e6\u7406<\/h3>\n<p>DefineShape \u30bf\u30b0\u306e parse &amp; dump &amp; build \u51e6\u7406\u3092 PHP \u3067\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li> <a href=\"http:\/\/svn.openpear.org\/IO_SWF\/branches\/1.0\/IO\/SWF\/Shape.php\">http:\/\/svn.openpear.org\/IO_SWF\/branches\/1.0\/IO\/SWF\/Shape.php<\/a><\/li>\n<\/ul>\n<p>openpear \u306e IO_Bit, IO_SWF \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"superpre \">\npear channel-discover openpear.org\npear install openpear\/IO_Bit\npear install openpear\/IO_SWF<\/pre>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_15\"> DefineShape \u306e\u5192\u982d<\/h4>\n<ul>\n<li> RECORDHEADER(tag code & length) \u306e\u76f4\u5f8c\u306b Shape Id (= Character ID) \u3068\u63cf\u753b\u67a0(RECT Type)\u304c\u3042\u308a\u3001\u305d\u306e\u5f8c\u308d\u306b SHAPEWITHSTYLE \u304c\u7d9a\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre>\n$this->_shapeId = $reader->getUI16LE();\n$this->_shapeBounds = IO_SWF_Type::parseRECT($reader);\n\uff1cSHAPE WITH STYLE \u306e\u51e6\u7406\uff1e<\/pre>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_16\"> STYLE<\/h4>\n<p>FILLSTYLE \u3068 LINESTYLE \u306e\u914d\u5217\u3067\u3059\u3002<br \/>\nFILLSTYLE \u306e Gradient \u51e6\u7406\u306e\u5f15\u7528\u306f\u7701\u7565\u3057\u3066\u3044\u307e\u3059\u304c\u3001svn.openpear.org \u306b\u306f\u51e6\u7406\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u8208\u5473\u304c\u3042\u308c\u3070\u305d\u3061\u3089\u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<pre class=\"superpre php\">\n$this->_parseFILLSTYLEARRAY($reader);\n$this->_parseLINESTYLEARRAY($reader);\n\nfunction _parseFILLSTYLEARRAY(&$reader, $tagCode) {\n    \/\/ FillStyle\n    $fillStyleCount = $reader->getUI8();\n    if (($tagCode > 2) && ($fillStyleCount == 0xff)) {\n       \/\/ DefineShape2 \u4ee5\u964d\u306f 0xffff \u30b5\u30a4\u30ba\u307e\u3067\u6271\u3048\u308b\n       $fillStyleCount = $reader->getUI16LE();\n    }\n    for ($i = 0 ; $i < $fillStyleCount ; $i++) {\n        $fillStyle = array();\n        $fillStyleType = $reader->getUI8();\n        $fillStyle['FillStyleType'] = $fillStyleType;\n        switch ($fillStyleType) {\n          case 0x00: \/\/ solid fill\n            if ($tagCode < 32 ) { \/\/ 32:DefineShape3\n                $fillStyle['Color'] = IO_SWF_Type::parseRGB($reader);\n            } else {\n                $fillStyle['Color'] = IO_SWF_Type::parseRGBA($reader);\n            }\n              break;\n          case 0x10: \/\/ linear gradient fill\n          case 0x12: \/\/ radial gradient fill\n            \uff1c\u7565\uff1e\n        break;\n          \/\/ case 0x13: \/\/ focal gradient fill \/\/ 8 and later\n          \/\/ break;\n          case 0x40: \/\/ repeating bitmap fill\n          case 0x41: \/\/ clipped bitmap fill\n          case 0x42: \/\/ non-smoothed repeating bitmap fill\n          case 0x43: \/\/ non-smoothed clipped bitmap fill\n            $fillStyle['BitmapId'] = $reader->getUI16LE();\n            $fillStyle['BitmapMatrix'] = IO_SWF_Type::parseMATRIX($reader);\n            break;\n          default:\n            \/\/ \u53d7\u7406\u3067\u304d\u306a\u3044\u65e8\u306e\u30a8\u30e9\u30fc\u51fa\u529b\n            break 2; \/\/ \u30eb\u30fc\u30d7\u7d42\u4e86\n        }\n        $this->_fillStyles[] = $fillStyle;\n    }\n}\nfunction _parseLINESTYLEARRAY(&$reader, $tagCode) {\n    $lineStyleCount = $reader->getUI8();\n    if (($tagCode > 2) && ($lineStyleCount == 0xff)) {\n       \/\/ DefineShape2 \u4ee5\u964d\u306f 0xffff \u30b5\u30a4\u30ba\u307e\u3067\u6271\u3048\u308b\n       $lineStyleCount = $reader->getUI16LE();\n    }\n    for ($i = 0 ; $i < $lineStyleCount ; $i++) {\n        $lineStyle = array();\n        $lineStyle['Width'] = $reader->getUI16LE();\n        if ($tagCode < 32 ) { \/\/ 32:DefineShape3\n            $lineStyle['Color'] = IO_SWF_Type::parseRGB($reader);\n        } else {\n            $lineStyle['Color'] = IO_SWF_Type::parseRGBA($reader);\n        }\n        $this->_lineStyles[] = $lineStyle;\n    }\n}<\/pre>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_17\"> SHAPE WITH STYLE<\/h4>\n<p>StyleChangeRecord \u3067\u5bfe\u5fdc\u3059\u308b STYLE \u3068\u63cf\u753b\u306e\u521d\u671f\u4f4d\u7f6e\u3092\u6c7a\u3081\u3066\u3001\u305d\u3053\u304b\u3089 Edge \u3067\u7dda\u3084\u66f2\u7dda\u3092\u5f15\u304d\u3001\u307e\u305f\u3001StyleChangeRecord \u3067\u3002\u3068\u3044\u3046\u306e\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3001End \u3067\u7d42\u4e86\u3057\u307e\u3059\u3002StyleChangeRecord \u306e StateNewStyles \u304c 1 \u306e\u5834\u5408\u306f\u3001\u65b0\u898f\u306b STYLE \u3092\u8aad\u307f\u306a\u304a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"superpre php\">\n$this->_parseFILLSTYLEARRAY($reader);\n$this->_parseLINESTYLEARRAY($reader);\n$reader->byteAlign();\n\/\/ \u63cf\u753b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\n$numFillBits = $reader->getUIBits(4);\n$numLineBits = $reader->getUIBits(4);\n$currentDrawingPositionX = 0;\n$currentDrawingPositionY = 0;\n$currentFillStyle0 = 0;\n$currentFillStyle1 = 0;\n$currentLineStyle = 0;\n\n$done = false;\n\/\/ ShapeRecords\nwhile ($done === false) {\n    $typeFlag = $reader->getUIBit();\n    if ($typeFlag == 0) {\n        $endOfShape = $reader->getUIBits(5);\n        if ($endOfShape == 0) {\n            $done = true;\n        } else {\n            \/\/ StyleChangeRecord\n            $reader->incrementOffset(0, -5);\n            $stateNewStyles = $reader->getUIBit();\n            ...\n            if ($stateNewStyles) {\n                $this->_parseFILLSTYLEARRAY($reader);\n                $this->_parseLINESTYLEARRAY($reader);\n                $reader->byteAlign();\n                $numFillBits = $reader->getUIBits(4);\n                $numLineBits = $reader->getUIBits(4);\n            }\n        }\n    } else {\n        $straightFlag = $reader->getUIBit();\n        if ($straightFlag) {\n             \/\/ StraightEdgeRecord\n             ...\n        } else {\n             \/\/ CurvedEdgeRecord\n             ...\n        }\n    }\n}<\/pre>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_18\"> \u52d5\u4f5c\u30b5\u30f3\u30d7\u30eb<\/h4>\n<pre class=\"superpre \">\n% php IO_SWF\/sample\/swfdump.php negi.swf\n\uff1c\u7565\uff1e\nShapeId: 1\nShapeBounds:\n        (-7.75, -7.75) - (7.75, 7.75)\nFillStyles:\n        solid fill: #0066ff\nLineStyles:\nShapeRecords:\n        ChangeStyle: MoveTo: (-7.75, -7.75)  FillStyle: 0|1  LineStyle: 0\n        StraightEdge: MoveTo: (7.75, -7.75)\n        StraightEdge: MoveTo: (7.75, 7.75)\n        StraightEdge: MoveTo: (-7.75, 7.75)\n        StraightEdge: MoveTo: (-7.75, -7.75)<\/pre>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_19\"> \u30c7\u30d5\u30a9\u30eb\u30e1\u306e\u5b9f\u9a13<\/h3>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_20\"> \u30c7\u30d5\u30a9\u30eb\u30e1\u306e\u4ed5\u7d44\u307f<\/h4>\n<p>\u3053\u3053\u307e\u3067\u306b\u8aac\u660e\u3057\u3066\u304d\u305f\u5185\u5bb9\u3092\u5143\u306b\u3001DefineShape \u4e2d\u306e Edge \u306e\u6570\u3092\u6e1b\u3089\u3057\u3066\u753b\u50cf\u3092\u30c7\u30d5\u30a9\u30eb\u30e1\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\nStyleChange \u3068 Edge \u30ea\u30b9\u30c8\u306e\u7d44\u304c\u3072\u3068\u3064\u306e\u7dda\u306b\u306a\u308b\u306e\u3067\u3001\u307e\u305a\u306f\u305d\u306e\u5358\u4f4d\u3067\u51e6\u7406\u3092\u5206\u5272\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"superpre php\">\nfunction deforme($threshold) {\n    $startIndex = null;\n    foreach ($this->_shapeRecords as $shapeRecordIndex => $shapeRecord) {\n        if (($shapeRecord['TypeFlag'] == 0) && (isset($shapeRecord['EndOfShape']) === false)) {\n            \/\/ StyleChangeRecord\n            $endIndex = $shapeRecordIndex - 1;\n            if (is_null($startIndex) === false) {\n                $this->deformeShapeRecordUnit($threshold, $startIndex, $endIndex);\n            }\n            $startIndex = $shapeRecordIndex;\n        }\n        if (isset($shapeRecord['EndOfShape']) && ($shapeRecord['EndOfShape']) == 0) {\n            \/\/ EndShapeRecord\n            $endIndex = $shapeRecordIndex - 1;\n            $this->deformeShapeRecordUnit($threshold, $startIndex, $endIndex);\n        }\n    }\n    $this->_shapeRecords = array_values($this->_shapeRecords);\n}<\/pre>\n<p>\u4e00\u5b9a\u8ddd\u96e2\u306e\u95be\u5024\u3092 $threshold \u5f15\u6570\u3067\u53d7\u3051\u3066\u3001\u8ddd\u96e2\u5185\u306b\u66f2\u7dda\u3092\u76f4\u7dda\u306b\u3001\u8ddd\u96e2\u5185\u306b\u3042\u308b\uff12\u3064\u306e\u76f4\u7dda\u3092\uff11\u3064\u306e\u76f4\u7dda\u306b\u3002\u3068\u3044\u3046\u6226\u7565\u3092\u3068\u308a\u307e\u3059\u3002<br \/>\nSWF \u5185\u90e8\u306e\u5ea7\u6a19\u306f TWIPS \u5358\u4f4d\u306e\u5024\u3092\u53d6\u308a\u307e\u3059\u306e\u3067\u300120 \u500d\u3057\u305f\u5024\u304c pixel \u306e\u8ddd\u96e2\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"superpre php\">\nfunction deformeShapeRecordUnit($threshold, $startIndex, $endIndex) {\n\/\/  return $this->deformeShapeRecordUnit_1($threshold, $startIndex, $endIndex);\n    return $this->deformeShapeRecordUnit_2($threshold, $startIndex, $endIndex);\n}<\/pre>\n<ul>\n<li> \u8a66\u884c\u932f\u8aa4\u4e2d\u306a\u306e\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3067\u5207\u308a\u66ff\u3048\u3066\u3044\u308b\u306e\u306f\u5fa1\u611b\u5b0c\u3067\u3002<\/li>\n<li> \u30b3\u30fc\u30c9\u91cf\u304c\u305d\u3053\u305d\u3053\u3042\u308b\u306e\u3067 deformeShapeRecordUnit \u306e\u5148\u306f\u5f15\u7528\u3057\u307e\u305b\u3093\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306f IO\/SWF\/Shape.php \u3092\u53c2\u7167\u3057\u3066\u4e0b\u3055\u3044\u3002<\/li>\n<\/ul>\n<h4 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_21\"> \u30c7\u30d5\u30a9\u30eb\u30e1\u5b9f\u884c<\/h4>\n<ul>\n<li> <a href=\"http:\/\/svn.openpear.org\/IO_SWF\/branches\/1.0\/IO\/SWF\/Shape.php\">http:\/\/svn.openpear.org\/IO_SWF\/branches\/1.0\/IO\/SWF\/Shape.php<\/a><\/li>\n<li> <a href=\"http:\/\/svn.openpear.org\/IO_SWF\/branches\/1.0\/sample\/swfdeformeshape.php\">http:\/\/svn.openpear.org\/IO_SWF\/branches\/1.0\/sample\/swfdeformeshape.php<\/a><\/li>\n<\/ul>\n<ul>\n<li> \u30b5\u30f3\u30d7\u30eb\u7d20\u6750 SWF (sample.swf)<\/li>\n<\/ul>\n<p>\uff1d\u62e1\u5927\uff1d\uff1e<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/fancy_hakoniwa-2\/\" rel=\"attachment wp-att-3152\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/fancy_hakoniwa.png\" alt=\"\" title=\"fancy_hakoniwa\" width=\"241\" height=\"260\" class=\"aligncenter size-full wp-image-3152\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/fancy_hakoniwa.png 241w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/fancy_hakoniwa-185x200.png 185w\" sizes=\"auto, (max-width: 241px) 100vw, 241px\" \/><\/a><\/p>\n<ul>\n<li> \u30c7\u30d5\u30a9\u30eb\u30e1\u5b9f\u884c (\u95be\u5024:100)<\/li>\n<\/ul>\n<pre class=\"superpre \">\nphp sample\/swfdeformeshape.php sample.swf 100 > deforme-100.swf<\/pre>\n<p>\uff1d\u62e1\u5927\uff1d\uff1e<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/deforme_hakoniwa-100-2\/\" rel=\"attachment wp-att-3153\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/deforme_hakoniwa-100.png\" alt=\"\" title=\"deforme_hakoniwa-100\" width=\"241\" height=\"260\" class=\"aligncenter size-full wp-image-3153\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/deforme_hakoniwa-100.png 241w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/deforme_hakoniwa-100-185x200.png 185w\" sizes=\"auto, (max-width: 241px) 100vw, 241px\" \/><\/a><\/p>\n<p>\u3053\u306e\u5834\u5408\u3067 40KByte\u3000\u304c 37KByte \u306b\u6e1b\u308a\u307e\u3059\u3002<br \/>\n\u9055\u3044\u304c\u5206\u304b\u308a\u306b\u304f\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u3001\u66f4\u306b\u5f37\u3081\u306b\u30c7\u30d5\u30a9\u30eb\u30e1\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<ul>\n<li> \u30c7\u30d5\u30a9\u30eb\u30e1\u5b9f\u884c (\u95be\u5024:1000)<\/li>\n<\/ul>\n<pre class=\"superpre \">\nphp sample\/swfdeformeshape.php sample.swf 1000 > deforme-1000.swf<\/pre>\n<p>\uff1d\u62e1\u5927\uff1d\uff1e<a href=\"http:\/\/labs.gree.jp\/blog\/2011\/04\/2328\/deforme_hakoniwa-1000-2\/\" rel=\"attachment wp-att-3154\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/deforme_hakoniwa-1000.png\" alt=\"\" title=\"deforme_hakoniwa-1000\" width=\"241\" height=\"261\" class=\"aligncenter size-full wp-image-3154\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/deforme_hakoniwa-1000.png 241w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2011\/04\/deforme_hakoniwa-1000-184x200.png 184w\" sizes=\"auto, (max-width: 241px) 100vw, 241px\" \/><\/a><\/p>\n<p>35KByte \u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3061\u3087\u3063\u3068\u3053\u308c\u306f\u3084\u308a\u904e\u304e\u3067\u3059\u306d\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30e1\u306e\u6577\u5c45\u5024\u3092\u3046\u307e\u304f\u6c7a\u3081\u308b\u4e8b\u304c\u51fa\u6765\u308c\u3070\u3001SWF \u30d5\u30a1\u30a4\u30eb\u306e\u8ee2\u9001\u91cf\u3092\u6e1b\u3089\u3057\u305f\u308a\u3001Flash Player \u306e\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf\u3092\u6e1b\u3089\u3057\u305f\u308a\u3068\u5b09\u3057\u3044\u4e8b\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_22\"> \u5099\u8003<\/h3>\n<ul>\n<li> ChangeStyle \u306e\u5ea7\u6a19\u5024\u306b\u306f MoveDeltaX, MoveDeltaY \u306e\u540d\u524d\u304c\u4ed8\u3044\u3066\u3044\u3066\u3001\u305d\u306e\u8aac\u660e\u3067\u3082\u3001\u7d9a\u304f\u30ec\u30b3\u30fc\u30c9\u306f \"relatice to the current drawing position\" \u3068\u66f8\u304b\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u5b9f\u969b\u306b\u8a66\u3059\u3068\u6bce\u56de\u3000origin (0, 0) \u304b\u3089\u306e Delta \u3067\u8a08\u7b97\u3057\u306a\u3044\u3068\u90fd\u5408\u304c\u5408\u308f\u306a\u3044\u306e\u3067\u3001\u56f3\u306b\u306f MoveX, MoveY \u3068\u8868\u8a18\u3057\u307e\u3057\u305f\u3002<\/li>\n<li> Bit \u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u3067\u306f(bit padding \u306b\u3088\u308b) byte alignment \u304c\u91cd\u8981\u3067\u3059\u304c\u3001DefineShape \u306f\u5927\u62b5\u3001alignment \u304c\u5fc5\u8981\u306a\u6240\u3067 Byte \u8981\u7d20\u3092\u8aad\u307f\u3060\u3059\u4e8b\u304c\u591a\u3044\u306e\u3067\u6ec5\u591a\u306b\u554f\u984c\u306b\u306a\u308a\u307e\u305b\u3093\u3002\u305d\u308c\u3067\u6cb9\u65ad\u3057\u3066\u308b\u3068\u3001StateNewStyles = 1 \u306e\u6642\u306e NumFillBits (4bit field) \u3084\u3001DefineMorphShape \u3067\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u753b\u50cf\u3092\u6271\u3046\u6642\u306e EndBitmapMatrix \u3067 Byte Alignment \u3092\u53d6\u308a\u5fd8\u308c\u3066 1\/8 \u306e\u78ba\u7387\u3067\u7f60\u306b\u306f\u307e\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_23\"> \u53c2\u8003<\/h3>\n<ul>\n<li>\n SWF \u516c\u5f0f\u4ed5\u69d8\u66f8<\/p>\n<ul>\n<li>  <a href=\"http:\/\/www.adobe.com\/devnet\/swf.html\">http:\/\/www.adobe.com\/devnet\/swf.html<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n Hacking SWF<\/p>\n<ul>\n<li>  <a href=\"http:\/\/codeazur.com.br\/fitc\/\">http:\/\/codeazur.com.br\/fitc\/<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n SWF format Shape<\/p>\n<ul>\n<li>  <a href=\"http:\/\/pwiki.awm.jp\/~yoya\/?Flash\/SWF\/format\/Shape\">http:\/\/pwiki.awm.jp\/~yoya\/?Flash\/SWF\/format\/Shape<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3 id=\"hs_acdfc8a5f0ef7acade4c6ae8bdea48f0_header_24\"> \u6b21\u56de\u4e88\u5b9a<\/h3>\n<p>\u6b21\u56de\u306f FILLSTYLE \u306e\u3046\u3061\u306e\u3000Bitmap \u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002<br \/>\n\u305d\u308c\u3067\u306f\u5931\u793c\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u958b\u767a\u306e\u3088\u3084\u3067\u3059\u3002 \u4eca\u56de\u306f DefineShape \u30bf\u30b0\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002DefineShape \u30bf\u30b0\u306f Flash SWF \u304c\u30d9\u30af\u30bf\u30fc\u753b\u50cf\u3092\u683c\u7d0d\u3059\u308b\u30bf\u30b0\u3067\u3059\u3002 \u7b2c3\u56de\uff5e\u7b2c5\u56de\u3067\u3068\u308a\u3042\u3052\u305f B [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[18,23],"class_list":["post-2328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-info","tag-flash","tag-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/2328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=2328"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/2328\/revisions"}],"predecessor-version":[{"id":21153,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/2328\/revisions\/21153"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=2328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=2328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=2328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}