powered by nequal
Home » IO_SWF » Timeline » 2868

Changeset 2868 -- 2012-02-05 20:15:33

Author
よや
Comment
NewStyle の処理を修正 (wireframe を呼ぶ) typo 修正 wireflame => wireframe

Diffs

IO_SWF/trunk/sample/swfwireframe.php

@@ -24,28 +24,30 @@
if ($tag->parseTagContent($opts) === false) {
throw new IO_SWF_Exception("Can't parseTagContent tag_code=$tag_code");
}
-        $transTable = swfwireflame($tag->tag->_fillStyles, $tag->tag->_lineStyles);
+        $transTable = swfwireframe($tag->tag->_fillStyles, $tag->tag->_lineStyles);
foreach ($tag->tag->_shapeRecords as &$record) {
if ($record['TypeFlag'] == 0 && (isset($record['EndOfShape']) === false)) {
-                if ($record['LineStyle'] === 0) {
+                if (isset($record['FillStyles'])) {
+                    $transTable = swfwireframe($record['FillStyles'], $record['LineStyles']);
+                }
+                if ($record['LineStyle'] == 0) {
if ($record['FillStyle0']) {
$record['LineStyle'] = $transTable[$record['FillStyle0']];
} else if ($record['FillStyle1']) {
$record['LineStyle'] = $transTable[$record['FillStyle1']];
+                    } else {
+                        $record['LineStyle'] = 1; // XXX
}
$record['FillStyle0'] = 0;
$record['FillStyle1'] = 0;
}
-                if (isset($record['FillStyles'])) {
-                    $transTable = swfwireflame($record['FillStyles'], $record['LineStyles']);
-                }
}
}
$tag->content = null;
}
}
-function swfwireflame(&$fillStyles, &$lineStyles) {
+function swfwireframe(&$fillStyles, &$lineStyles) {
$transTable = array();
$lineStylesIdx = count($lineStyles);
foreach ($fillStyles as $idx => $fillStyle) {