From f6664548e02bd08b34e81ec8945fb30dffa247c3 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 30 Jan 2006 14:32:54 +0000 Subject: [PATCH] Fill the background git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@206115 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/image/functions/imagepsloadfont.xml | 3 ++- reference/image/functions/imagettftext.xml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/reference/image/functions/imagepsloadfont.xml b/reference/image/functions/imagepsloadfont.xml index 72845d7039..73a4cb91cf 100644 --- a/reference/image/functions/imagepsloadfont.xml +++ b/reference/image/functions/imagepsloadfont.xml @@ -1,5 +1,5 @@ - + @@ -28,6 +28,7 @@ header("Content-type: image/jpeg"); $im = imagecreatetruecolor(350, 45); $black = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); +imagefilledrectangle($im, 0, 0, 349, 44, $white); $font = imagepsloadfont("bchbi.pfb"); // or locate your .pfb files on your machine imagepstext($im, "Testing... It worked!", $font, 32, $white, $black, 32, 32); imagepsfreefont($font); diff --git a/reference/image/functions/imagettftext.xml b/reference/image/functions/imagettftext.xml index a55495a8b2..0514a7844f 100644 --- a/reference/image/functions/imagettftext.xml +++ b/reference/image/functions/imagettftext.xml @@ -1,5 +1,5 @@ - + @@ -165,6 +165,7 @@ $im = imagecreatetruecolor(400, 30); $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); +imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = 'Testing...';