functions

TriangleFilled
Edited: Sunday 25 January 2026

TriangleFilled

Category: Molecules
File: molecules.go
Package: ui

Signature

1func TriangleFilled(p1, p2, p3 image.Point, fill color.NRGBA) W

Description

TriangleFilled renders a filled triangle defined by three points.
The triangle connects p1 -> p2 -> p3 and fills the interior with the specified color.

Example:

tri := TriangleFilled(
    image.Pt(50, 0),
    image.Pt(0, 100),
    image.Pt(100, 100),
    color.NRGBA{R: 255, A: 255},
)

Useful for arrows, direction indicators, or custom geometric shapes.

Examples

TriangleFilled

1{
2	tri := TriangleFilled(
3		image.Pt(50, 0),
4		image.Pt(0, 100),
5		image.Pt(100, 100),
6		STRAWBERRY_500,
7	)
8	_ = tri
9}

Example Output


This documentation is auto-generated. To update, run make docs

Backlinks