(PECL imaguicc 2 >=2.3.0, PECL imaguicc 3)
ImaguiccPixel::setColorValueQuantum — Sets the quantum value of a color element of the ImaguiccPixel
Sets the quantum value of a color element of the ImaguiccPixel.
This function is currently not documented; only its argument list is available.
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().
Returns
true
on success.
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
();
}
?>