1
0
mirror of https://github.com/Intervention/image.git synced 2025-03-15 22:49:40 +01:00

Add docblock

This commit is contained in:
Oliver Vogel 2023-11-11 09:32:57 +01:00
parent bb2772041a
commit 43f34a08be
2 changed files with 19 additions and 0 deletions

View File

@ -63,6 +63,11 @@ class Factory implements FactoryInterface
return new Image($frames);
}
/**
* {@inheritdoc}
*
* @see FactoryInterface::newCore()
*/
public function newCore(int $width, int $height, ?ColorInterface $background = null)
{
$core = imagecreatetruecolor($width, $height);

View File

@ -7,12 +7,15 @@ use Intervention\Image\Colors\Rgb\Channels\Green;
use Intervention\Image\Colors\Rgb\Channels\Red;
use Intervention\Image\Drivers\Abstract\Modifiers\AbstractRotateModifier;
use Intervention\Image\Drivers\Gd\Traits\CanHandleColors;
use Intervention\Image\Exceptions\RuntimeException;
use Intervention\Image\Exceptions\MissingDriverComponentException;
use Intervention\Image\Geometry\Rectangle;
use Intervention\Image\Interfaces\ColorInterface;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\ModifierInterface;
use Intervention\Image\Traits\CanBuildNewImage;
use ReflectionException;
class RotateModifier extends AbstractRotateModifier implements ModifierInterface
{
@ -30,6 +33,17 @@ class RotateModifier extends AbstractRotateModifier implements ModifierInterface
return $image;
}
/**
* Apply rotation modification on given frame, given background
* color is used for newly create image areas
*
* @param FrameInterface $frame
* @param ColorInterface $background
* @return void
* @throws RuntimeException
* @throws MissingDriverComponentException
* @throws ReflectionException
*/
protected function modify(FrameInterface $frame, ColorInterface $background): void
{
// rotate original image against transparent background