|
użytkowników online: 40
|
OPINIE UŻYTKOWNIKÓW
|
Mimo, że strony WWW tworzymy już 5 lat zawsze znajdziemy coś ciekawego. Świadczy o tym chociażby nasza aktówka, w której znajduje się kilkadziesiąt porad, z których często korzystamy. Otwarta forma poradnika, czyli możliwość podrzucania tematów oraz wspólny ich rozwój, to nieoceniona pomoc. Uważam, ze abonament roczny jest niewspółmiernie niski do jakości zaprezentowanych materiałów.
Marek Kończal
Internetix.pl
|
|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
imagefilledpolygon (PHP 3, PHP 4, PHP 5) imagefilledpolygon -- Draw a filled polygon Descriptionint imagefilledpolygon ( resource image, array points, int num_points, int color )
imagefilledpolygon() creates a filled polygon
in image image.
points is an array containing the
x and y co-ordinates
of the polygons vertices consecutively.
The parameter num_points is the total
number of vertices, which must be larger than 3.
Przykład 1. imagefilledpolygon() example |
<?php
$values = array(
40, 50, 20, 240, 60, 60, 240, 20, 50, 40, 10, 10 );
$image = imagecreate(250, 250);
$bg = imagecolorallocate($image, 200, 200, 200);
$blue = imagecolorallocate($image, 0, 0, 255);
imagefilledpolygon($image, $values, 6, $blue);
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
|
|
User Contributed Notesetnekor at tar dot hu
22-Jan-2006 10:18
There is a simple function to draw a filled point with a chosen radius and color.
<?php
function drawPoint($img, $radius, $origo_x, $origo_y, $pointColor)
{
for ($i=0;$i<=360;$i++)
{
$pont[] = $origo_x + ($radius * sin(deg2rad($i)));
$pont[] = $origo_y - ($radius * cos(deg2rad($i)));
}
reset($pont);
ImageFilledPolygon ($img, $pont, (sizeof($pont)/2), $pointColor);
}
?>
|