paint

package module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 6 Imported by: 0

README

Utility lib for writing shapes on an image

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabel

func AddLabel(img *image.RGBA, pos Coords, label string, col color.Color)

func DrawArc

func DrawArc(img *image.RGBA, center Coords, radius int, startAngle, endAngle float64, clr color.RGBA, thickness int)

func DrawCircle

func DrawCircle(img *image.RGBA, clr color.RGBA, radius int, center Coords)

func DrawFilledCircle

func DrawFilledCircle(img *image.RGBA, color color.RGBA, radius int, center Coords)

func DrawLine

func DrawLine(img *image.RGBA, p1, p2 Coords, color color.RGBA, thickness int, dotted bool)

func DrawRectangle

func DrawRectangle(img *image.RGBA, p1, p2 Coords, clr color.RGBA, thickness int, dotted bool)

func DrawRotatedRectangle

func DrawRotatedRectangle(img *image.RGBA, p1, p2 Coords, theta float64, clr color.RGBA, thickness int, dotted bool)

func DrawTriangle

func DrawTriangle(img *image.RGBA, p1, p2, p3 Coords, clr color.RGBA, thickness int, dotted bool)

Types

type Coords

type Coords struct {
	X, Y int
}

func RotatePoint

func RotatePoint(p, center Coords, theta float64) Coords

func RotateRectangle

func RotateRectangle(p1, p2 Coords, theta float64) [4]Coords

Expects p1 to be top left and p2 to be bottom right

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL