meme

package
v0.0.0-...-3971041 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meme

type Meme struct {
	ID         string   `json:"id"`
	Name       string   `json:"name"`
	Filename   string   `json:"filename"`
	FontColor  string   `json:"font-color"`
	LineChars  int      `json:"line-chars"`
	MarginLeft int      `json:"margin-left"`
	TextAlign  string   `json:"text-align"`
	Boxes      [][4]int `json:"boxes"`
}

func (Meme) DrawTexts

func (m Meme) DrawTexts(texts []string, canvas *image.RGBA) (err error)

func (Meme) Generate

func (m Meme) Generate(webRoot embed.FS, texts []string) (*bytes.Buffer, error)

type Memes

type Memes map[string]Meme

func NewMeme

func NewMeme(configFile []byte) (config *Memes, err error)

func (Memes) FindMeme

func (mm Memes) FindMeme(memeID string) (*Meme, error)

Jump to

Keyboard shortcuts

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