Вход Регистрация
Файл: vendor/intervention/image/src/Modifiers/DrawPixelModifier.php
Строк: 47
<?php

declare(strict_types=1);

namespace 
InterventionImageModifiers;

use 
InterventionImageDriversSpecializableModifier;
use 
InterventionImageExceptionsColorDecoderException;
use 
InterventionImageExceptionsStateException;
use 
InterventionImageInterfacesColorInterface;
use 
InterventionImageInterfacesPointInterface;

class 
DrawPixelModifier extends SpecializableModifier
{
    
/**
     * Create new modifier object.
     */
    
public function __construct(
        public 
PointInterface $position,
        public 
string|ColorInterface $color,
    ) {
        
//
    
}

    
/**
     * Return color for the new pixel.
     *
     * @throws StateException
     * @throws ColorDecoderException
     */
    
protected function color(): ColorInterface
    
{
        return 
$this->driver()->decodeColor($this->color);
    }
}
Онлайн: 3
Реклама