Surface.triangle
From Spheriki
Draw a filled triangle onto the surface.
Contents |
Usage
- surface Sphere Surface object. The surface to draw the triangle onto.
- x1, y1 numbers. The (x, y) coordinates of the first point, in pixels.
- x2, y2 numbers. The (x, y) coordinates of the second point, in pixels.
- x3, y3 numbers. The (x, y) coordinates of the third point, in pixels.
- color Sphere Color object. The color of the triangle.
Examples
See the examples for Surface.clone(), which contains a usage of the Surface.triangle() function.
Notes
- Like all functions that draw onto surfaces, you will not see the results of this function until you draw the surface onto the screen, using Surface.blit().