Skip to content

surf:fillTriangle

CrazedProgrammer edited this page Apr 23, 2017 · 3 revisions

surf:drawTriangle(x1, y1, x2, y2, x3, y3[, b, t, c])

  • x1, y1 (float)
    First point
  • x2, y2 (float)
    Second point
  • x3, y3 (float)
    Third point
  • b, t, c (colour)
    Drawing colour

Draws a filled triangle.
Note that this has support for non-integer coordinates, and uses the midpoint of a pixel (+0.5, +0.5) to determine whether or not it is in the triangle.

Clone this wiki locally