generator

package
v0.0.0-...-3c37a66 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooMuchItem = errors.New("items are more than supported items in a tab")
)

Functions

func SplitSlice

func SplitSlice[T any](items []T, splitSize int) [][]T

Types

type Colors

type Colors struct {
	DefaultBackground GradientColor
	Rarities          map[string]GradientColor
}

type Fonts

type Fonts struct {
	Burbank     *llamaimage.LlamaFont
	KalamehBold *llamaimage.LlamaFont
}

type Generator

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

func NewGenerator

func NewGenerator(config *config.Config) (generator *Generator, err error)

func (*Generator) ColorOf

func (g *Generator) ColorOf(rarity string) GradientColor

func (*Generator) GenerateItemshop

func (g *Generator) GenerateItemshop(items []fortnite.ItemShopItem) (image.Image, error)

func (*Generator) GenerateItemshopIcon

func (g *Generator) GenerateItemshopIcon(item fortnite.ItemShopItem) (image.Image, error)

func (*Generator) GetImage

func (g *Generator) GetImage(filename string) (image.Image, error)

type GradientColor

type GradientColor struct {
	Start   color.RGBA
	End     color.RGBA
	Overlay color.RGBA
}

Jump to

Keyboard shortcuts

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