note 96395 added to function.imagickdraw-circle

From: Date: Wed, 24 Feb 2010 19:34:02 +0000
Subject: note 96395 added to function.imagickdraw-circle
Groups: php.notes 
Request: Send a blank email to php-notes+get-166337@lists.php.net to get a copy of this message
<?php // OR we could just draw a simple circle for the benefit of the newbies. // I'm not great at OOP programming and I hope my comments are accurate. // commets or criticism are welcome. $image = new Imagick(); // Create a new instance an $image class $width = 600; // Some necessary dimensions $height = 400; // $image class now inherits some attributes. i.e. Dimensions, bkgcolor... $image->newImage( $width, $height, new ImagickPixel( 'lightgray' ) ); $draw = new ImagickDraw(); //Create a new drawing class (?) $draw->setFillColor('wheat'); // Set up some colors to use for fill and outline $draw->setStrokeColor( new ImagickPixel( 'green' ) ); $draw->circle( $width/2, $height/2, $width/2, $width/2 ); // Draw the circle already $image->drawImage( $draw ); // Apply the stuff from the draw class to the image canvas $image->setImageFormat('jpg'); // Give the image a format header('Content-type: image/jpeg'); // Prepare the web browser to display an image echo $image; // Publish it to the world! //$image->writeImage('someimage.jpg"); // ...Or just write it to a file... ?> ---- Server IP: 64.71.164.2 Probable Submitter: 173.64.192.29 ---- Manual Page -- http://www.php.net/manual/en/function.imagickdraw-circle.php Edit -- https://master.php.net/note/edit/96395 Del: integrated -- https://master.php.net/note/delete/96395/integrated Del: useless -- https://master.php.net/note/delete/96395/useless Del: bad code -- https://master.php.net/note/delete/96395/bad+code Del: spam -- https://master.php.net/note/delete/96395/spam Del: non-english -- https://master.php.net/note/delete/96395/non-english Del: in docs -- https://master.php.net/note/delete/96395/in+docs Del: other reasons-- https://master.php.net/note/delete/96395 Reject -- https://master.php.net/note/reject/96395 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166337) next »