| Extracted from Pike v7.8 release 866 at 2016-04-05.

[Top]
Image
Image.Image

# Method Image.Image()->line()

Method line

  `object line(int x1, int y1, int x2, int y2)`
  `object line(int x1, int y1, int x2, int y2, int r, int g, int b)`
  `object line(int x1, int y1, int x2, int y2, int r, int g, int b, int alpha)`

Description

  Draws a line on the image. The line is not antialiased.

  original | ->line (50,10, 10,50, 255,0,0)

Parameter `x1`
Parameter `y1`
Parameter `x2`
Parameter `y2`

  line endpoints

Parameter `r`
Parameter `g`
Parameter `b`

  color

Parameter `alpha`

  alpha value

Returns

  the object called