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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Draws a triangle on the framebuffer.

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

API:Video/navbox