Code: Select all
$image = imagecreatetruecolor($paneWidth, $pageHeight);
$background = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0, 0, $background);
$textColor = imagecolorallocate($image, 0, 0, 0);
drawVector($x_1, $y_1, $x_2, $y_2, $x_3, $y_3, $x_4, $y_4);
imagefilledpolygon($image,$createVector, 4, $polygonFill);
imagestringup($image, 3,($x_1 + $x_2)/2, $y_1-5,$CarrierLabel,$textColor);
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);