testutil

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Icon = newIconDir("icon.ico", []entry{
		{Width: 64, Height: 64, BPP: 1},
		{Width: 16, Height: 16, BPP: 1},
		{Width: 64, Height: 64, BPP: 4},
		{Width: 32, Height: 32, BPP: 4},
		{Width: 16, Height: 16, BPP: 4},
		{Width: 64, Height: 64, BPP: 8},
		{Width: 32, Height: 32, BPP: 8},
		{Width: 16, Height: 16, BPP: 8},
		{Width: 64, Height: 64, BPP: 24},
		{Width: 32, Height: 32, BPP: 24},
		{Width: 16, Height: 16, BPP: 24},
		{Width: 256, Height: 256, BPP: 32},
		{Width: 64, Height: 64, BPP: 32},
		{Width: 32, Height: 32, BPP: 32},
		{Width: 16, Height: 16, BPP: 32},
	})
	Cursor = newIconDir("cursor.cur", []entry{
		{Width: 128, Height: 128, BPP: 32, XHotspot: 20, YHotspot: 20},
		{Width: 64, Height: 64, BPP: 32, XHotspot: 10, YHotspot: 10},
		{Width: 48, Height: 48, BPP: 32, XHotspot: 5, YHotspot: 5},
		{Width: 32, Height: 32, BPP: 32, XHotspot: 3, YHotspot: 3},
	})
)

Functions

func Compare

func Compare(t *testing.T, expected, actual image.Image)

func CompareIconDir

func CompareIconDir(t *testing.T, dir IconDir, entries []*icondir.Entry, mm []image.Image)

func Palettize

func Palettize(m image.Image) image.Image

Types

type IconDir

type IconDir struct {
	Name    string
	Entries []entry
}

func (IconDir) MustRead

func (d IconDir) MustRead() []byte

Jump to

Keyboard shortcuts

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