Set pixed

@param array $settings = []

@return GD
321910
public function pixel(Array $settings = []) : GD
    {
        $x   = $settings['x']     ?? $this->x     ?? 0;
        $y   = $settings['y']     ?? $this->y     ?? 0;
        $rgb = $settings['color'] ?? $this->color ?? '0|0|0';

        imagesetpixel($this->canvas, $x, $y, $this->allocate($rgb));

        $this->defaultRevolvingVariables();

        return $this;
    }
1068457
public static function initStatic(array $settings): array
    {
        $settings += static::$settings ?? [];
        foreach ($settings as $name => &$value) {
            $propertyName = null;
            if (property_exists(static::class, $name)) {
                $propertyName = $name;
                unset($settings[$name]);
            }

            if ($propertyName === null
                && property_exists(static::class, NameConverter::snakeCaseToCamelCase($name))) {
                $propertyName = NameConverter::snakeCaseToCamelCase($name);
                unset($settings[$name]);
            }

            $methodName = 'set' . $propertyName;
            if (is_callable([static::class, $methodName])) {
                static::{$methodName}($value);
                continue;
            }

            if (array_key_exists($propertyName, get_class_vars(static::class))) {
                static::${$propertyName} = $value;
            }
        }

        unset($value);

        return $settings;
    }
621009
public function setPixel($x, $y, $values) {
        $rgb = $this->getRGB($x, $y);

        foreach ($rgb as $name => $value) {
            $rgb[$name] = bindec(substr(decbin($value), 0, -1) . $values[$name]);
        }

        $color = imagecolorallocate($this->image, $rgb['r'], $rgb['g'], $rgb['b']);
        imagesetpixel($this->image, $x, $y, $color);
        imagecolordeallocate($this->image, $color);

        return $this;
    }
773309
public function settings(array $settings = null)
    {
        if ($settings !== null) {
            $this->settings = $settings;
        }

        return $this->settings;
    }
1156564
static function instance( $settings = array() )
    {
        if (
            !isset( $GLOBALS['eZScriptInstance'] )
            || !( $GLOBALS['eZScriptInstance'] instanceof eZScript )
        )
        {
            $GLOBALS['eZScriptInstance'] = new eZScript( $settings );
        }
        else if ( !empty( $settings ) )
        {
            $GLOBALS['eZScriptInstance']->updateSettings( $settings );
        }

        return $GLOBALS['eZScriptInstance'];
    }
676508
private function syncSettings(array $settings)
    {
        if (false === getenv($this->envOriginalInis)) {
            // Called by another app, so make original inis available
            Process::setEnv($this->envOriginalInis, implode(PATH_SEPARATOR, $settings['inis']));
        }

        self::$skipped = $settings['skipped'];
        $this->notify(Status::INFO, 'Process called with existing restart settings');
    }
1070478
public function setSettings( $settings )
    {
        if ( ! empty( $settings ) )
        {
            foreach ( $settings as $name => $value )
            {
                $this->setSetting( $name, $value );
            }
        }

        return $this;
    }
266474
public function changeDatabase(array $setting)
    {
        $pdoCon = new Pdo($setting);
        $pdoCon->setVitex($this->vitex);
        $this->DB = $pdoCon;
        $this->pdo = $this->DB->pdo;
        return $this;
    }
928038
public function settings(array $settings = null)
    {
        if ($settings !== null) {
            $this->settings = $settings;
        }

        return $this->settings + static::$globalSettings;
    }
246662
public static function getInstance(array $settings = []): DIInterface
    {
        if (! self::$instance) {
            self::$instance = new DI($settings);
        }
        
        return self::$instance;
    }
833220
public function setFromRequest($settings)
    {
        $this->removeTokenKey($settings);

        foreach ($settings as $settingName => $settingValues) {
            $this->set($settingName, $settingValues);
        }
    }
721382
public function loadSettings(array $settings)
    {
        $relationalManagerKey = $this->getOption(static::RELATIONAL_MANAGER_KEY);
        if (array_key_exists($relationalManagerKey, $settings)) {
            $this->registerEntityManagers((array) $settings[$relationalManagerKey]);
        }

        $mongoDBManagerKey = $this->getOption(static::MONGODB_MANAGER_KEY);
        if (array_key_exists($mongoDBManagerKey, $settings)) {
            $this->registerMongoDBDocumentManagers((array) $settings[$mongoDBManagerKey]);
        }

        $couchDBManagerKey = $this->getOption(static::COUCHDB_MANAGER_KEY);
        if (array_key_exists($couchDBManagerKey, $settings)) {
            $this->registerCouchDBDocumentManagers((array) $settings[$couchDBManagerKey]);
        }

        return $this;
    }
666069
public static function setColors(array $colors = array())
    {
        if (!empty($colors)) {
            static::$colors = $colors;
            return;
        }
        static::$colors = array(
            \Monolog\Logger::DEBUG     => 'purple',
            \Monolog\Logger::INFO      => 'cyan',
            \Monolog\Logger::NOTICE    => 'green',
            \Monolog\Logger::WARNING   => 'yellow',
            \Monolog\Logger::ERROR     => 'red',
            \Monolog\Logger::CRITICAL  => 'red',
            \Monolog\Logger::ALERT     => 'red',
            \Monolog\Logger::EMERGENCY => 'red',
        );
    }
603907
protected function setSettings(array $settings): void
    {
        $this->server->set(array_merge($this->defaultSettings, $this->settings, $settings));
    }
844099
public function set($options = [
        'icon' => null,
        'title' => null,
        'message' => '',
        'url' => null,
        'target' => null
    ], $settings = []){
        $settings = Arr::merge($this->settings, $settings);
        $this->session->flash('notify.options', $options);
        $this->session->flash('notify.settings', $settings);
        $this->hook->put('__app.notify.options', $options);
        $this->hook->put('__app.notify.settings', $settings);
        return $this;
    }
757959
public function setSettings($settings = [])
    {
        $original = $this->settings;
        $this->mergeSettings($settings, $this->settings);
        if ($this->settings != $original) {
            // @todo - Log Curl equivalent during test mode (adds overhead and risk so only do it during test)
            // if (!isset($this->settings['handler']) && class_exists(
            //         '\Namshi\Cuzzle\Middleware\CurlFormatterMiddleware'
            //     )) {
            //     $this->logger      = new Logger('guzzle.to.curl'); //initialize the logger
            //     $this->testHandler = new TestHandler(); //test logger handler
            //     $this->logger->pushHandler($this->testHandler);
            //
            //     $this->handler = HandlerStack::create();
            //     $this->handler->after('cookies', new \Namshi\Cuzzle\Middleware\CurlFormatterMiddleware($this->logger));
            //     $this->settings['handler'] = $this->handler;
            // }
            $this->client = new Client($this->settings);
        }
    }
165615
protected function updateSettingsWithConsoleOptions($settings)
    {
        $directMapSettings = [
            'url', 'set', 'metadataPrefix', 'timeout', 'combineRecordsTag',
            'injectDate', 'injectId', 'injectSetName', 'injectSetSpec',
            'idSearch', 'idReplace', 'dateGranularity', 'harvestedIdLog',
            'badXMLLog', 'httpUser', 'httpPass', 'sslcapath', 'sslcafile',
            'sanitizeRegex',
        ];
        foreach ($directMapSettings as $setting) {
            if ($value = $this->opts->getOption($setting)) {
                $settings[$setting] = $value;
            }
        }
        $flagSettings = [
            'combineRecords' => ['combineRecords', true],
            'v' => ['verbose', true],
            'autosslca' => ['autosslca', true],
            'nosslverifypeer' => ['sslverifypeer', false],
            'sanitize' => ['sanitize', true],
        ];
        foreach ($flagSettings as $in => $details) {
            if ($this->opts->getOption($in)) {
                list($out, $val) = $details;
                $settings[$out] = $val;
            }
        }
        return $settings;
    }