1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 17:19:50 +02:00

Added Color::toInt

This commit is contained in:
Oliver Vogel
2021-10-31 06:59:48 +00:00
parent 9f885da391
commit 2c0e2eb719
2 changed files with 6 additions and 1 deletions

View File

@@ -54,4 +54,9 @@ class Color extends AbstractColor implements ColorInterface
return [$r, $g, $b, $a];
}
public function toInt(): int
{
return $this->value;
}
}

View File

@@ -24,7 +24,7 @@ class FillModifier implements ModifierInterface
$filling = $this->getApplicableFilling();
foreach ($image as $frame) {
imagefilledrectangle($frame->getCore(), 0, 0, $width - 1, $height - 1, $filling);
imagefilledrectangle($frame->getCore(), 0, 0, $width - 1, $height - 1, $filling->toInt());
}
return $image;