mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fill the background
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@206115 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ea7870ac21
commit
f6664548e0
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/image.xml, last change in rev 1.7 -->
|
||||
<refentry id="function.imagepsloadfont">
|
||||
<refnamediv>
|
||||
|
@ -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);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<!-- splitted from ./en/functions/image.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.imagettftext">
|
||||
<refnamediv>
|
||||
|
@ -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...';
|
||||
|
|
Loading…
Reference in a new issue