swf2ass/src/DrawPathList.php

25 lines
662 B
PHP

<?php
namespace swf2ass;
class DrawPathList {
/** @var DrawPath[] */
public array $commands;
public function __construct($commands = []) {
$this->commands = $commands;
}
public function merge(DrawPathList $b): DrawPathList {
return new DrawPathList(array_merge($this->commands, $b->commands));
}
public static function fromArray(array $firstElement, StyleList $currentStyles, ?array $secondElement = null, bool $flip = false): DrawPathList {
$converter = new ShapeConverter($firstElement, $currentStyles, $secondElement);
$converter->convert($flip);
return $converter->commands;
}
}