utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClipToLastN added in v0.0.3

func ClipToLastN[T any](slice []T, n int) []T

func DecodeFromBase64AndUngzip

func DecodeFromBase64AndUngzip(data string) ([]byte, error)

func DecodeFromCh426AndUngzip

func DecodeFromCh426AndUngzip(data string) ([]byte, error)

func EqualRunes added in v0.0.3

func EqualRunes(slice []rune, target string) bool

func FillOver

func FillOver(target *ebiten.Image, fillColor color.Color)

func FillOverRect

func FillOverRect(target *ebiten.Image, bounds image.Rectangle, fillColor color.Color)

func FillOverRectLighter

func FillOverRectLighter(target *ebiten.Image, bounds image.Rectangle, fillColor color.Color)

func FmtTicksToTimeStrCents added in v0.0.3

func FmtTicksToTimeStrCents(ticks int) string

func FmtTicksToTimeStrSecs added in v0.0.3

func FmtTicksToTimeStrSecs(ticks int) string

func GzipAndEncodeAsBase64

func GzipAndEncodeAsBase64(data []byte) (string, error)

func GzipAndEncodeAsCh426

func GzipAndEncodeAsCh426(data []byte) (string, error)

func ProjectNearest

func ProjectNearest(logicalCanvas, canvas *ebiten.Image) *ebiten.Image

func ProjectPixelPerfect

func ProjectPixelPerfect(logicalCanvas, canvas *ebiten.Image) *ebiten.Image

Unless you are on macOS, of course.

func ProjectStretched

func ProjectStretched(logicalCanvas, canvas *ebiten.Image)

func RGBAf64

func RGBAf64(r, g, b, a float64) color.RGBA

func ReadClipboard

func ReadClipboard() string

func Rect

func Rect(ox, oy, fx, fy int) image.Rectangle

func SetMaxMultRawWindowSize

func SetMaxMultRawWindowSize(width, height int, logicalMargin int)

func SetRawWindowSize

func SetRawWindowSize(width, height int, logicalMargin int) bool

Returns false if the window size is too big.

func WithAlpha

func WithAlpha(clr color.RGBA, newAlpha uint8) color.RGBA

func WriteClipboard

func WriteClipboard(text string)

Types

type Blinker

type Blinker struct {
	// contains filtered or unexported fields
}

func NewBlinker

func NewBlinker(minValue, maxValue, speed float64) *Blinker

func (*Blinker) Update

func (self *Blinker) Update()

func (*Blinker) Value

func (self *Blinker) Value() float64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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