util

package
v0.0.0-...-ac5b73c Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GrayColor   = color.NRGBA{R: 0x80, G: 0x80, B: 0x80, A: 0xFF}
	RedColor    = color.NRGBA{R: 0xC0, G: 0x40, B: 0x40, A: 0xFF}
	YellowColor = color.NRGBA{R: 0xC0, G: 0xC0, B: 0x40, A: 0xFF}
	GreenColor  = color.NRGBA{R: 0x40, G: 0xC0, B: 0x40, A: 0xFF}
	BlueColor   = color.NRGBA{R: 0x40, G: 0x40, B: 0xC0, A: 0xFF}
)

Functions

func DrawArrow

func DrawArrow(ops *op.Ops, start, end image.Point, squareSize f32.Point, width float32, color color.NRGBA)

func DrawCircle

func DrawCircle(ops *op.Ops, rect image.Rectangle, width float32, color color.NRGBA)

func DrawCross

func DrawCross(ops *op.Ops, rect image.Rectangle, width float32, color color.NRGBA)

func DrawEllipse

func DrawEllipse(ops *op.Ops, rect image.Rectangle, color color.NRGBA)

func DrawImage

func DrawImage(ops *op.Ops, img image.Image, at image.Point, factor f32.Point)

func DrawPane

func DrawPane(ops *op.Ops, rect image.Rectangle, color color.NRGBA)

func DrawRectangle

func DrawRectangle(ops *op.Ops, rect image.Rectangle, width float32, color color.NRGBA)

func Floor

func Floor(val float32) int

func Min

func Min[T constraints.Ordered](a, b T) T

func OpenImage

func OpenImage(filename string) (image.Image, error)

func Rect

func Rect(origin, size image.Point) image.Rectangle

func Round

func Round(val float32) int

func ToF32

func ToF32(pt image.Point) f32.Point

func Transparentize

func Transparentize(c color.NRGBA, percent float32) color.NRGBA

Types

This section is empty.

Jump to

Keyboard shortcuts

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