17 lines
479 B
PHP
17 lines
479 B
PHP
<?php
|
|
|
|
namespace swf2ass;
|
|
|
|
class GradientItem {
|
|
public $position;
|
|
public $color;
|
|
|
|
public function __construct($position, Color $color) {
|
|
$this->position = $position;
|
|
$this->color = $color;
|
|
}
|
|
|
|
public static function fromXML(\DOMElement $element): GradientItem {
|
|
return new GradientItem($element->getAttribute("position"), Color::fromXML($element->getElementsByTagName("color")->item(0)->getElementsByTagName("Color")->item(0)));
|
|
}
|
|
} |