Pixeler\Matrix::setPixel PHP Метод

setPixel() публичный Метод

public setPixel ( $x, $y, $value = true, $color = null )
    public function setPixel($x, $y, $value = true, $color = null)
    {
        $y = (int) $y;
        $x = (int) $x;
        if ($x < $this->width && $y < $this->height) {
            $this->matrix[$x + $y * $this->width] = !!$value;
            $this->colors[$x >> 1 + ($y >> 2) * $this->width] = $color;
        }
    }