Skip to content

pchp250g8-home-php-tutorials/php-web-drawellipse

Repository files navigation

DrawEllipse. PHP Tutorials. 2D Graphics. GD. Web Application. This web application (site) consists of an HTML page with a file named "index.html" and a PHP script with a file named "DrawEllipse.php." The web page with the file named "Index.html" is the start page of the web application (site). It is a web form for submitting data to the PHP script with the file named "DrawEllipse.php" using the "POST" method. Consists of the following elements:

  1. A label with the name "label1" and the value "Width:".
  2. A numeric input field named "EllipseWidth".
  3. A label with the name "label2" and the value "Height:".
  4. A numeric input field named "EllipseHeight".
  5. A "submit data" button with the name "Submit" and the value "Submit".
  6. The "reset data" button with the name "Reset" and the value "Reset". A PHP script with a file named "DrawEllipse.php" does the following:
  7. Reads web form data. Data is read from numeric fields named "EllipseWidth" and "EllipseHeight."
  8. Creates variables to store the dimensions of the ellipse displayed on the screen.
  9. Creates an image with dimensions given by the values ​​of the corresponding variables.
  10. Clears it with black color.
  11. Creates variables for the red outline and yellow color of the ellipse.
  12. Sets the ellipse outline thickness to 30 pixels.
  13. Draws an ellipse with the previously specified parameters on a black background.
  14. Sets the data format for output to the web page as a png image.
  15. Outputs data to a browser web page.
  16. Frees resources and terminates.

DrawEllipse. Занятия по PHP. 2D Графика. Библиотека GD. Веб Приложение. Данное веб приложение (сайт) состоит из HTML страницы с файлом по имени "index.html" и скрипта на языке программирования PHP с файлом по имени "DrawEllipse.php". Веб страница с файлом по имени "Index.html" является стартовой страницей веб приложения (сайта). Представляет собой веб форму для передачи данных в скрипт на языке программирования PHP с файлом по имени "DrawEllipse.php" методом "POST". Состоит из следующих элементов:

  1. Надпись с именем "label1" и значением "Width:".
  2. Числовое поле ввода данных с именем "EllipseWidth".
  3. Надпись с именем "label2" и значением "Height:".
  4. Числовое поле ввода данных с именем "EllipseHeight".
  5. Кнопка "отправка данных" с именем "Submit" и значением "Submit".
  6. Кнопка "сброс данных" с именем "Reset" и значением "Reset". Скрипт на языке программирования PHP с файлом по имени "DrawEllipse.php" делает следущее:
  7. Читает данные веб формы. Данные считываются из числовых полей с именами "EllipseWidth" и "EllipseHeight".
  8. Создаёт переменные для сохранения размеров выводимого на экран эллипса.
  9. Создаёт картинку с размерами со значениями соответствующих переменных.
  10. Очищает её чёрным светом.
  11. Создаёт переменные для красного контура и жёлтого цвета эллипса.
  12. Устанавливает толщину контура эллипса в 30 пикселей.
  13. Рисует эллипс с заданными ранее параметрами на чёрнрм фоне.
  14. Устанвливает формат данных для вывода на веб страницу как картинка png.
  15. Выводит данные на веб страницу браузера.
  16. Освобождает ресурсы и завершает работу.

About

DrawEllipse. PHP Tutorials. 2D Graphics. GD. Web Application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors