Документация PHP


imageantialias

imagechar

Image Функции

PHP Manual


imagearc

(PHP 4, PHP 5)

imagearc — Draws an arc

Описание

bool imagearc ( resource $image , int $cx , int $cy , int $width , int $height , int $start , int $end , int $color )

imagearc() draws an arc of circle centered at the given coordinates.

Список параметров

image

An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().

cx

x-coordinate of the center

cy

y-coordinate of the center

width

The arc width

height

The arc height

start

The arc start angle, in degrees.

end

The arc end angle, in degrees. 0° is located at the three-o'clock position, and the arc is drawn clockwise.

color

A color identifier created with imagecolorallocate()

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Примеры

Пример #1 Drawing a circle with imagearc()

<?php

// create a 200*200 image
$img imagecreatetruecolor(200200);

// allocate some colors
$white imagecolorallocate($img255255255);
$red   imagecolorallocate($img255,   0,   0);
$green imagecolorallocate($img,   0255,   0);
$blue  imagecolorallocate($img,   0,   0255);

// draw the head
imagearc($img100100200200,  0360$white);
// mouth
imagearc($img10010015015025155$red);
// left and then the right eye
imagearc($img,  60,  75,  50,  50,  0360$green);
imagearc($img140,  75,  50,  50,  0360$blue);

// output image in the browser
header("Content-type: image/png");
imagepng($img);

// free memory
imagedestroy($img);

?>

Результатом выполнения данного примера будет что-то подобное:

Смотрите также


imageantialias

imagechar

Image Функции

PHP Manual

SAPE все усложнил?

MainLink - простая и прибыльная продажа ссылок!

Последние поступления:

Размещена 10 августа 2020 года

Я по ТВ видел, что через 10 лет мы будем жить лучше, чем в Германии...
Я не понял, что это они с Германией сделать хотят?!

читать далее…

ТехЗадание на Землю

Размещена 14 марта 2018 года

Пpоект Genesis (из коpпоpативной пеpеписки)

читать далее…

Шпаргалка по работе с Vim

Размещена 05 декабря 2017 года

Vim довольно мощный редактор, но работа с ним не всегда наглядна.
Например если нужно отредактировать какой-то файл например при помощи crontab, без знания специфики работы с viv никак.

читать далее…

Ошибка: Error: Cannot find a valid baseurl for repo

Размещена 13 сентабря 2017 года

Если возникает ошибка на centos 5 вида
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/

читать далее…

Linux Optimization

Размещена 30 июля 2012 года

Prelink

читать далее…