pkg

package
v0.4.40 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundType added in v0.1.3

type BackgroundType struct {
	Color string `json:"color" yaml:"color"`
}

type Config

type Config struct {
	Text       string         `json:"text" yaml:"text"`
	Wrap       bool           `json:"wrap" yaml:"wrap"`
	Color      string         `json:"color" yaml:"color"`
	Background BackgroundType `json:"background" yaml:"background"`
	Font       string         `json:"font,omitempty" yaml:"font,omitempty"`
	Size       float64        `json:"size,omitempty" yaml:"size,omitempty"`
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

func (*Config) FitText added in v0.4.1

func (c *Config) FitText(context internal.Context, font string, width, height int) error

func (*Config) GenerateImage

func (c *Config) GenerateImage(width, height int) (image.Image, error)

func (*Config) Validate

func (c *Config) Validate() error

type ImageGenerator

type ImageGenerator interface {
	GenerateImage(width, height int) (image.Image, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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