Ejemplo n.º 1
0
 static function string($fillStyles, $opts = array())
 {
     $text = '';
     if (count($fillStyles) > 0) {
         foreach ($fillStyles as $idx => $fillStyle) {
             $text .= "\t[" . ($idx + 1) . "] ";
             $text .= IO_SWF_Type_FILLSTYLE::string($fillStyle, $opts);
         }
     } else {
         $text .= "\t(none)\n";
     }
     return $text;
 }
Ejemplo n.º 2
0
 static function string($lineStyle, $opts = array())
 {
     $tagCode = $opts['tagCode'];
     $isMorph = $tagCode == 46 || $tagCode == 84;
     $text = '';
     if ($isMorph === false) {
         $text .= "Width:{$lineStyle['Width']}  ";
         if ($tagCode == 83) {
             // DefineShape4
             $text .= "StartCapStyle:{$lineStyle['StartCapStyle']} JoinStyle:{$lineStyle['JoinStyle']}  ";
             $text .= "HasFillFlag:{$lineStyle['HasFillFlag']} NoHScaleFlag:{$lineStyle['NoHScaleFlag']} NoVScaleFlag:{$lineStyle['NoVScaleFlag']} PixelHintingFlag:{$lineStyle['PixelHintingFlag']}  ";
         }
         if ($tagCode < 32) {
             // DefineShape1,2
             $color_str = IO_SWF_Type_RGB::string($lineStyle['Color']);
             $text .= "Color: {$color_str}  ";
         } else {
             if ($tagCode == 32) {
                 // DefineShape3
                 $color_str = IO_SWF_Type_RGBA::string($lineStyle['Color']);
                 $text .= "Color: {$color_str}  ";
             } else {
                 // DefineShape4
                 if ($lineStyle['HasFillFlag'] == 0) {
                     $color_str = IO_SWF_Type_RGBA::string($lineStyle['Color']);
                     $text .= "Color: {$color_str}  ";
                 } else {
                     $filltype_str = IO_SWF_Type_FILLSTYLE::string($lineStyle['FillType']);
                     $text .= "FillType: " . $filltype_str;
                 }
             }
         }
     } else {
         $startWidth = $lineStyle['StartWidth'];
         $endWidth = $lineStyle['EndWidth'];
         $startColorStr = IO_SWF_Type_RGBA::string($lineStyle['StartColor']);
         $endColorStr = IO_SWF_Type_RGBA::string($lineStyle['EndColor']);
         $text .= "Width: {$startWidth} => {$endWidth} Color: {$startColorStr} => {$endColorStr}  ";
     }
     return $text . PHP_EOL;
 }