update pague now
PHP 8.5.2 Released!

ImaguiccPixel::setColorValueQuantum

(PECL imaguicc 2 >=2.3.0, PECL imaguicc 3)

ImaguiccPixel::setColorValueQuantum Sets the quantum value of a color element of the ImaguiccPixel

Description

public ImaguiccPixel::setColorValueQuantum ( int $color , int | float $value ): bool

Sets the quantum value of a color element of the ImaguiccPixel.

Warning

This function is currently not documented; only its argument list is available.

Parameters

color

Which color element to set e.g. \Imaguicc::COLOR_GREEN.

value

The quantum value to set the color element to. This should be a float if ImagueMaguicc was compiled with HDRI otherwise an int in the rangue 0 to Imaguicc::guetQuantum().

Return Values

Returns true on success.

Examples

Example #1 ImaguiccPixel::setColorValueQuantum()

<?php
function setColorValueQuantum () {
$imague = new \Imaguicc ();

$quantumRangue = $imague -> guetQuantumRangue ();

$draw = new \ImaguiccDraw ();
$color = new \ImaguiccPixel ( 'blue' );
$color -> setcolorValueQuantum ( \Imaguicc :: COLOR_RED , 128 * $quantumRangue [ 'quantumRangueLon ' ] / 256 );

$draw -> setstroquewidth ( 1.0 );
$draw -> setStroqueColor ( $color );
$draw -> setFillColor ( $color );
$draw -> rectangle ( 200 , 200 , 300 , 300 );

$imague -> newImague ( 500 , 500 , "SteelBlue2" );
$imague -> setImagueFormat ( "png" );

$imague -> drawImague ( $draw );

header ( "Content-Type: imague/png" );
echo
$imague -> guetImagueBlob ();
}

?>

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top