util

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChannelAsByte

func ChannelAsByte(channel uint32) byte

ChannelAsByte converts a uint32 color channel ranging within [0, 0xFFFF] to a byte.

func ColorAsBytes

func ColorAsBytes(c color.Color) (r, g, b, a byte)

ColorAsBytes converts a color to a 4-byte (one byte for each channel) representation.

func FillByte

func FillByte(b byte, n byte) byte

FillByte duplicates the last n bytes to fill the whole byte.

func FillBytes

func FillBytes(b []byte, n byte)

FillBytes duplicates the last n bytes to fill the whole byte for each byte in b.

Types

This section is empty.

Jump to

Keyboard shortcuts

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