35 lines
965 B
PHP
35 lines
965 B
PHP
<?php
|
|
|
|
namespace swf2ass;
|
|
|
|
|
|
class RenderedObject {
|
|
/** @var int[] */
|
|
public array $depth;
|
|
public int $objectId;
|
|
public DrawPathList $drawPathList;
|
|
public ?ClipPath $clip;
|
|
public ColorTransform $colorTransform;
|
|
public MatrixTransform $matrixTransform;
|
|
|
|
public function __construct(array $depth, int $objectId, DrawPathList $drawPathList, ColorTransform $colorTransform, MatrixTransform $matrixTransform, ?ClipPath $clip = null) {
|
|
$this->depth = $depth;
|
|
$this->objectId = $objectId;
|
|
$this->drawPathList = $drawPathList;
|
|
$this->colorTransform = $colorTransform;
|
|
$this->matrixTransform = $matrixTransform;
|
|
$this->clip = $clip;
|
|
}
|
|
|
|
public function setClipPath(?ClipPath $path){
|
|
$this->clip = $path;
|
|
}
|
|
|
|
/**
|
|
* @return int[]
|
|
*/
|
|
public function getDepth(): array {
|
|
return $this->depth[0] === 0 ? array_slice($this->depth, 1) : $this->depth;
|
|
}
|
|
}
|