DJ Mike's Tutorials: PHP

Imagemagick Functions


^

ImagickDraw::point

Description:
bool ImagickDraw::point ( float $x , float $y )

Draws a point using the current stroke color and stroke thickness at the specified coordinates.
Parameters
x
point*s x coordinate
y
point*s y coordinate
Return Values
No value is returned.

Examples



<?
# Make an image object
$image = new imagick();
$image->newimage(30060"white");

# Make a draw object
$point = new imagickdraw();
# give it color
$point->setfillcolor("blue");

# draw a sine wave pixel by pixel
for( $x=0$x<300$x++ )
{
$amp 25;
$sin sin(deg2rad($x))*$amp;
$point->point$x30+$sin );
$image->drawimage($point);
}

# send to browser
$image->setimageformat("jpeg");
header("content-type:image/jpeg");
echo 
$image;
?>


^

Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>