function pImage::pImage
Search API
5.x pImage.class.php | pImage::pImage($XSize, $YSize, $DataSet = NULL, $TransparentBackground = FALSE) |
File
- inc/
pchart/ pchart/ class/ pImage.class.php, line 85
Class
Code
function pImage($XSize, $YSize, $DataSet = NULL, $TransparentBackground = FALSE)
{
$this->TransparentBackground = $TransparentBackground;
if ($DataSet != NULL) {
$this->DataSet = $DataSet;
}
$this->XSize = $XSize;
$this->YSize = $YSize;
$this->Picture = imagecreatetruecolor($XSize, $YSize);
if ($this->TransparentBackground)
{
imagealphablending($this->Picture, FALSE);
imagefilledrectangle($this->Picture, 0, 0, $XSize, $YSize, imagecolorallocatealpha($this->Picture, 255, 255, 255, 127));
imagealphablending($this->Picture, TRUE);
imagesavealpha($this->Picture, true);
}
else
{
$C_White = $this->AllocateColor($this->Picture, 255, 255, 255);
imagefilledrectangle($this->Picture, 0, 0, $XSize, $YSize, $C_White);
}
}