Legacy:Triangle
From Spherical
Draws a triangle on the framebuffer.
Contents
Usage
Triangle(x1, y1, x2, y2, x3, y2, color);
- x1 integer. the X coordinate of the first vertex.
- y1 integer. the Y coordinate of the first vertex.
- x2 integer. the X coordinate of the second vertex.
- y2 integer. the Y coordinate of the second vertex.
- x3 integer. the X coordinate of the third vertex.
- y3 integer. the Y coordinate of the third vertex.
- color Color. a color object created with CreateColor
Notes
Remember that FlipScreen must be called before any drawing is visible on the screen.
Examples
Draw a triangle on the screen:
var Red = CreateColor(255, 0, 0, 255);
Triangle(16, 16, 32, 32, 16, 32, Red);
See also
- Sphere Color Object
- CreateColor(r, g, b, a)
- GradientTriangle(x1, x2, y1, y2, x3, y3, color1, color2, color3)
- Rectangle(x, y, w, h, color)
- Point(x, y, color)