Hello dear forum users :)

Here I have such a question, how to draw it on php ? I read some articles in Google , but I did not find anything except for well-known and incomprehensible scripts.

Can anyone explain to me how to scroll?

Thank you in advance.

Interesting:

I simply show, for example, how to draw a straight line or a curve.)

  • one
    Somehow you were looking bad. See the simplest examples - Deonis
  • @Deonis, yes, most likely, that I was looking bad, thanks a lot. - k0mar
  • one
    @IamS, In general, of course drawing on php is already a step of despair)) For the future, dig some library: Paper.js, Processing.js, Raphael.js and drawing will be much more pleasant. Personally for my taste - this is Raphael , but the choice is yours)) - Deonis

2 answers 2

How to draw a line (php)

The line in PHP is drawn with the help of the function bool imageline(resource image, int x1, int y1, int x2, int y2, int color) . The function takes 6 parameters: a resource image, 4 parameters with coordinates of a line and color.

  • The fire, what I was looking for :) Thank you. - k0mar
  • But for this, the server had to be compiled with the GD2 library support function igolka97

MB What are you talking about: GD and Image Functions ?