graphics

package
v0.0.0-...-2489ded Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QualityHigh = 1 + iota
	QualityMedium
	QualityLow
	QualityVeryLow
)

Variables

View Source
var (
	PalettePlayer = []float32{
		0.3, 0.0, 0.7, 0.,
		1.0, 0.84, 0., 1. / 3.,
		0.3, 0.0, 0.7, 2. / 3.,
		1.0, 0.54, 0., 1.,
	}

	PaletteRoad = []float32{
		0.4, 0.4, 0.4, 0.,
		0.1, 0.1, 0.1, 1. / 3.,
		0.54, 0.16, 0.88, 2. / 3.,
		0.7, 0.0, 0.7, 1.,
	}

	PaletteBlock = []float32{
		0.0, 0.0, 0.7, 0.,
		0.0, 0.7, 0.0, 1. / 3.,
		0.0, 0.0, 0.7, 2. / 3.,
		0.0, 0.7, 0.0, 1.,
	}

	PaletteBlockHarder = []float32{
		1.0, 0.54, 0.0, 0.,
		0.1, 0.1, 0.1, 1. / 3.,
		1.0, 0.89, 0.0, 2. / 3.,
		1.0, 0.54, 0.0, 1.,
	}

	PaletteBlockHarder2 = []float32{
		1.0, 0.0, 0.0, 0.,
		0.1, 0.1, 0.1, 1. / 3.,
		0.0, 0.0, 0.0, 2. / 3.,
		0.7, 0.0, 0.7, 1.,
	}

	PaletteHeart = []float32{
		0.87, 0.45, 1.0, 0.,
		0.53, 0.0, 0.52, 1. / 3.,
		0.43, 0.18, 0.66, 2. / 3.,
		0.43, 0.0, 1.0, 1.,
	}

	PaletteGoldenHeart = []float32{
		1.0, 0., 1.0, 0.,
		1.0, 0.55, 0., 1. / 3.,
		1.0, 0.84, 0., 2. / 3.,
		0.82, 0.41, 0.11, 1.,
	}
)

Functions

func DrawRect

func DrawRect(dst *ebiten.Image, x, y, width, height float32, clr []float32)

func DrawRectBorder

func DrawRectBorder(dst *ebiten.Image, x, y, width, height, borderWidth float32, clr []float32)

func GetOffscreenImage

func GetOffscreenImage() *ebiten.Image

func GetOffscreenOpts

func GetOffscreenOpts() *ebiten.DrawImageOptions

func GetQuality

func GetQuality() int

func SetQuality

func SetQuality(q int)

func UpdateQualitySettings

func UpdateQualitySettings() bool

Types

type Cache

type Cache struct {
	BlockCount     int
	BlockPositions []float32
	BlockSizes     []float32
	BlockKinds     []float32
	BlockSeeds     []float32
}

func NewCache

func NewCache() *Cache

func (*Cache) Reset

func (c *Cache) Reset()

Jump to

Keyboard shortcuts

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