17 lines
391 B
PHP
17 lines
391 B
PHP
<?php
|
|
|
|
namespace swf2ass;
|
|
|
|
class GradientItem {
|
|
public int $ratio;
|
|
public Color $color;
|
|
|
|
public function __construct(int $ratio, Color $color) {
|
|
$this->ratio = $ratio;
|
|
$this->color = $color;
|
|
}
|
|
|
|
public static function fromArray(array $element): GradientItem {
|
|
return new GradientItem($element["ratio"], Color::fromArray($element["color"]));
|
|
}
|
|
} |