functions

TriangleOutline
Edited: Sunday 25 January 2026

TriangleOutline

Category: Molecules
File: molecules.go
Package: ui

Signature

1func TriangleOutline(p1, p2, p3 image.Point, stroke color.NRGBA, width float32) W

Description

TriangleOutline renders a triangle outline defined by three points.
The triangle connects p1 -> p2 -> p3 with the specified stroke color and width.

Example:

tri := TriangleOutline(
    image.Pt(50, 0),
    image.Pt(0, 100),
    image.Pt(100, 100),
    color.NRGBA{B: 255, A: 255},
    2.0,
)

Perfect for creating bordered arrows, warning symbols, or geometric outlines.

Examples

TriangleOutline

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

Example Output


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

Backlinks