-
Notifications
You must be signed in to change notification settings - Fork 10
G2D.FillTriangle
boxgaming edited this page Sep 29, 2023
·
3 revisions
Draws a filled triangle.
G2D.FillTriangle 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 filled 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.FillTriangle Rnd * 640, Rnd * 400, Rnd * 640, Rnd * 480, Rnd * 640, Rnd * 480, Rnd * 14 + 1
_Limit 200
Next i