Esempio n. 1
0
 function dumpContent($tagCode, $opts = array())
 {
     $isMorph = $tagCode == 46 || $tagCode == 84;
     if (is_null($this->_shapeId) === false) {
         echo "    ShapeId: {$this->_shapeId}\n";
     }
     $opts = array('tagCode' => $tagCode, 'isMorph' => $isMorph);
     if ($isMorph === false) {
         echo "    ShapeBounds: " . IO_SWF_Type_RECT::string($this->_shapeBounds) . "\n";
         echo "    FillStyles:\n";
         echo IO_SWF_Type_FILLSTYLEARRAY::string($this->_fillStyles, $opts);
         echo "    LineStyles:\n";
         echo IO_SWF_Type_LINESTYLEARRAY::string($this->_lineStyles, $opts);
         echo "    ShapeRecords:\n";
         echo IO_SWF_Type_SHAPE::string($this->_shapeRecords, $opts);
     } else {
         echo "    StartBounds: " . IO_SWF_Type_RECT::string($this->_startBounds) . "\n";
         echo "    EndBounds: " . IO_SWF_Type_RECT::string($this->_endBounds) . "\n";
         echo "    Offset:{$this->_offset}\n";
         echo "    FillStyles:\n";
         echo IO_SWF_Type_FILLSTYLEARRAY::string($this->_morphFillStyles, $opts);
         echo "    LineStyles:\n";
         echo IO_SWF_Type_LINESTYLEARRAY::string($this->_morphLineStyles, $opts);
         echo "    StartEdge:\n";
         echo IO_SWF_Type_SHAPE::string($this->_startEdge, $opts);
         echo "    endEdge:\n";
         echo IO_SWF_Type_SHAPE::string($this->_endEdge, $opts);
     }
 }
Esempio n. 2
0
 function dumpContent($tagCode, $opts = array())
 {
     echo "\tCharacterID:{$this->CharacterID}\n";
     echo "\t" . IO_SWF_Type_RECT::string($this->Bounds) . "\n";
     echo "\tWordWrap:{$this->WordWrap} Multiline:{$this->Multiline} Password:{$this->Password} ReadOnly:{$this->ReadOnly}\n";
     if (is_null($this->FontID) === false) {
         echo "\tFontID:{$this->FontID} FontHeight:" . $this->FontHeight / 20 . "\n";
     }
     if (is_null($this->FontClass) === false) {
         echo "\tFontClass:{$this->FontClass}({" . bin2hex($this->FontClass) . ")\n";
     }
     if (is_null($this->TextColor) === false) {
         echo "\tTextColor" . IO_SWF_Type_RGBA::string($this->TextColor) . "\n";
     }
     if (is_null($this->MaxLength) === false) {
         echo "\tMaxLength:{$this->MaxLength}\n";
     }
     if (is_null($this->Align) === false) {
         echo "\tAlign:{$this->Align} LeftMargin:{$this->LeftMargin} RightMargin:{$this->RightMargin} Indent:{$this->Indent} Leading:" . $this->Leading / 20 . "\n";
     }
     echo "\tVariableName:{$this->VariableName}\n";
     if (is_null($this->InitialText) == false) {
         echo "\tInitialText:{$this->InitialText}\n";
     }
 }
Esempio n. 3
0
File: Text.php Progetto: yoya/IO_SWF
 function dumpContent($tagCode, $opts = array())
 {
     $opts['tagCode'] = $tagCode;
     echo "    CharacterID: {$this->_CharacterID}\n";
     echo "    TextBounds:\n";
     $rect_str = IO_SWF_Type_RECT::string($this->_TextBounds, $opts);
     echo "\t{$rect_str}\n";
     $opts['indent'] = 1;
     $matrix_str = IO_SWF_Type_MATRIX::string($this->_TextMatrix, $opts);
     echo "    TextMatrix:\n";
     echo "{$matrix_str}\n";
     echo "    GlyphBits: {$this->_GlyphBits} AdvanceBits: {$this->_AdvanceBits}\n";
     if (count($this->_TextRecords) == 0) {
         echo "    (TEXTRECORD empty)\n";
     } else {
         echo "    TextRecords:\n";
         foreach ($this->_TextRecords as $idx => $textRecord) {
             echo "      [{$idx}]:\n";
             echo "\t" . IO_SWF_Type_TEXTRECORD::string($textRecord, $opts);
         }
     }
 }
Esempio n. 4
0
 function dump($opts = array())
 {
     if (empty($opts['hexdump']) === false) {
         $bitio = new IO_Bit();
         $bitio->input($this->_swfdata);
     }
     /* SWF Header */
     echo 'Signature: ' . $this->_headers['Signature'] . PHP_EOL;
     echo 'Version: ' . $this->_headers['Version'] . PHP_EOL;
     echo 'FileLength: ' . $this->_headers['FileLength'] . PHP_EOL;
     echo 'FrameSize: ' . IO_SWF_Type_RECT::string($this->_headers['FrameSize']) . "\n";
     echo 'FrameRate: ' . $this->_headers['FrameRate'] / 0x100 . PHP_EOL;
     echo 'FrameCount: ' . $this->_headers['FrameCount'] . PHP_EOL;
     if (empty($opts['hexdump']) === false) {
         $bitio->hexdump(0, $this->_header_size);
         $opts['bitio'] =& $bitio;
         // for tag
     }
     $opts['indent'] = 0;
     /* SWF Tags */
     echo 'Tags:' . PHP_EOL;
     foreach ($this->_tags as $tag) {
         self::parseTagContent($tag, $opts);
     }
     $frame_num = 1;
     $sprite_tags = array();
     for ($i = 0; $i < count($this->_tags); $i++) {
         $tag = $this->_tags[$i];
         switch ($tag->code) {
             case 39:
                 // Sprite
                 $sprite_tags[] = $tag;
                 break;
             case 12:
                 // Action
             // Action
             case 59:
                 // InitAction
                 self::dumpActionTag($tag, $frame_num, $opts);
                 break;
             case 1:
                 // ShowFrame
                 $frame_num++;
                 break;
             case 43:
                 // FrameLabel
                 $tag->dump();
                 break;
             default:
                 break;
         }
     }
     foreach ($sprite_tags as $tag) {
         self::dumpSpriteTag($tag, $opts);
     }
 }
Esempio n. 5
0
File: SWF.php Progetto: yoya/IO_SWF
 function dump($opts = array())
 {
     if (empty($opts['hexdump']) === false) {
         $bitio = new IO_Bit();
         $bitio->input($this->_swfdata);
     }
     /* SWF Header */
     echo 'Signature: ' . $this->_headers['Signature'] . PHP_EOL;
     echo 'Version: ' . $this->_headers['Version'] . PHP_EOL;
     echo 'FileLength: ' . $this->_headers['FileLength'] . PHP_EOL;
     echo 'FrameSize: ' . IO_SWF_Type_RECT::string($this->_headers['FrameSize']) . "\n";
     echo 'FrameRate: ' . $this->_headers['FrameRate'] / 0x100 . PHP_EOL;
     echo 'FrameCount: ' . $this->_headers['FrameCount'] . PHP_EOL;
     if (empty($opts['hexdump']) === false) {
         $bitio->hexdump(0, $this->_header_size);
         $opts['bitio'] =& $bitio;
         // for tag
     }
     $opts['indent'] = 0;
     /* SWF Tags */
     if ($this->_headers['Version'] < 6) {
         ob_start('mb_convert_encoding_from_sjis');
     }
     echo 'Tags:' . PHP_EOL;
     foreach ($this->_tags as $tag) {
         try {
             $tag->dump($opts);
         } catch (IO_Bit_Exception $e) {
             echo "(tag dump failed) {$e}\n";
         }
         if ($this->_headers['Version'] < 6) {
             ob_flush();
         }
     }
 }