Legacy:Triangle

From Spherical
Jump to: navigation, search

Draws a triangle on the framebuffer.

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

API:Video/navbox