Draws a triangle.
Syntax
G2D.Triangle x1&, y1&, x2&, y2&, x3&, y3& [, clr~&]
Parameters
- The three sets of x and y parameters define the three points of the triangle to render.
- The optional color~& parameter defines the color of the triangle. If not specified, the default color will be used.
Examples
Example1: Draw numerous triangles of random size at random locations.
Import GFX From "lib/graphics/2d.bas"
Randomize Timer
Dim i As Integer
For i = 1 To 500
GFX.Triangle Rnd * 640, Rnd * 400, Rnd * 640, Rnd * 480, Rnd * 640, Rnd * 480, Rnd * 14 + 1
_Limit 200
Next i
See Also
G2D.FillTriangle