How to draw 2d geometric object (circle, polygon…) in php

前端 未结 1 771
礼貌的吻别
礼貌的吻别 2021-01-16 11:00

I want to create very simple 2d geometric object like circles and polygon. And print it to the screen like an image. How can i do with PHP

相关标签:
1条回答
  • 2021-01-16 11:41

    There are a few native PHP functions to do this, but you really shouldn't be doing this in PHP.

    You would need to create a blank image canvas via. imagecreatetruecolor, save it into the the directory of the server and fill it using some native image function such as imagefilledpolygon. PHP has built in imagefilled___ functions you can use.

    http://php.net/manual/en/function.imagefilledpolygon.php

    0 讨论(0)
提交回复
热议问题