-
Notifications
You must be signed in to change notification settings - Fork 10
G2D.Triangle
boxgaming edited this page May 13, 2023
·
2 revisions
Draws a triangle.
G2D.Triangle x1&, y1&, x2&, y2&, x3&, y3& [, clr~&]
- 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.
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