|
użytkowników online: 40
|
OPINIE UŻYTKOWNIKÓW
|
Po wysłaniu do Dariusza problemu jeszcze nie opisanego w poradach, odpowiedź pojawia się na stronach już po 24 godzinach. To jedna z najważniejszych zalet serwisu! Za około 100 złotych rocznie mam profesjonalnego i doświadczonego konsultanta od technologii internetowych! Polecam serwis z poradami każdemu webmasterowi, niezależnie od stażu pracy i umiejętności.
Paweł Kowalski
grupa hiperMEDIA.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]
imageellipse (PHP 4 >= 4.0.6, PHP 5) imageellipse -- Draw an ellipse Descriptionint imageellipse ( resource image, int cx, int cy, int w, int h, int color )
imageellipse() draws an ellipse centered at
cx, cy (top left is
0, 0) in the image represented by image.
W and h specifies the
ellipse's width and height respectively. The color of the ellipse is
specified by color.
Przykład 1. imageellipse() example |
<?php
$image = imagecreate(400, 300);
$bg = imagecolorallocate($image, 0, 0, 0);
$col_ellipse = imagecolorallocate($image, 255, 255, 255);
imageellipse($image, 200, 150, 300, 200, $col_ellipse);
header("Content-type: image/png");
imagepng($image);
?>
|
|
See also imagefilledellipse() and
imagearc().
User Contributed Notesjulian
16-Jan-2005 03:23
if you want to display an ellipse in the upper left corner of an image, you can easily calculate the corresponding cx and cy values. this example will draw an ellipse having the same width and height as the image.
<?php
$ellipse_width = 100;
$ellipse_height = 200;
$ellipse_cx = ($ellipse_width / 2);
$ellipse_cy = ($ellipse_height / 2);
$img_x = $ellipse_width;
$img_y = $ellipse_height;
$img = imagecreate($img_x, $img_y);
$bg = imagecolorallocate($img, 255,255,255);
$ellipse_color = imagecolorallocate($img, 0, 0, 0);
imageellipse($img, $ellipse_cx, $ellipse_cy, $ellipse_width, $ellipse_height, $ellipse_color);
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
?>
agentyoungsoo at hanmail dot net
05-Dec-2002 05:56
When you wana use "ImageEllipse" function
in under GD 2.0.2 version, you can use "ImageArc" like bellow
----------------------------------------------------
$file_name = "test.png";
$screen_x = 300;
$screen_y = 200;
$x1 = $screen_x / 2;
$y1 = $screen_y / 2;
$radius = 30;
$image = ImageCreate($screen_x, $screen_y);
$black = ImageColorAllocate($image, 0,0,0);
ImageArc($image, $x1, $y1, $radius , $radius , 0, 360, $black);
ImagePng($image, $file_name);
ImageDestroy($image);
----------------------------------------------------
|