Legacy:Triangle
From Spherical
Revision as of 12:16, 8 September 2013 by Flying Jester (talk | contribs) (Created page with "Draws a triangle on the framebuffer. ==Usage== {{Usage|func=Tirangle|params=x1, y1, x2, y2, x3, y2, color}} * '''x1''' the X coordinate of the first vertex. * '''y1''' the ...")
Draws a triangle on the framebuffer.
Contents
Usage
Tirangle(x1, y1, x2, y2, x3, y2, color);
- x1 the X coordinate of the first vertex.
- y1 the Y coordinate of the first vertex.
- x2 the X coordinate of the second vertex.
- y2 the Y coordinate of the second vertex.
- x3 the X coordinate of the third vertex.
- y3 the Y coordinate of the third vertex.
- 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)