mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Refined the fill pattern example a bit
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257748 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
cc73fbb14d
commit
6448a1e599
1 changed files with 8 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
|
||||
<chapter xml:id="imagick.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
|
@ -130,7 +130,7 @@ $im->newPseudoImage(50, 50, "gradient:red-black");
|
|||
$draw = new ImagickDraw();
|
||||
|
||||
/* Start a new pattern called "gradient" */
|
||||
$draw->pushPattern('gradient' , 0 , 0 , 50 , 50);
|
||||
$draw->pushPattern('gradient', 0, 0, 50, 50);
|
||||
|
||||
/* Composite the gradient on the pattern */
|
||||
$draw->composite(Imagick::COMPOSITE_OVER, 0, 0, 50, 50, $im);
|
||||
|
@ -145,15 +145,18 @@ $draw->setFillPatternURL('#gradient');
|
|||
$draw->setFontSize(52);
|
||||
|
||||
/* Annotate some text */
|
||||
$draw->annotation(50, 50, "Hello World!");
|
||||
$draw->annotation(20, 50, "Hello World!");
|
||||
|
||||
/* Create a new canvas and white image */
|
||||
/* Create a new canvas object and a white image */
|
||||
$canvas = new Imagick();
|
||||
$canvas->newImage(350, 200, "white");
|
||||
$canvas->newImage(350, 70, "white");
|
||||
|
||||
/* Draw the ImagickDraw on to the canvas */
|
||||
$canvas->drawImage($draw);
|
||||
|
||||
/* 1px black border around the image */
|
||||
$canvas->borderImage('black', 1, 1);
|
||||
|
||||
/* Set the format to PNG */
|
||||
$canvas->setImageFormat('png');
|
||||
|
||||
|
|
Loading…
Reference in a new issue