types

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tprecalcs = [...]string{"s2", "s3", "s4", "s5", "s6"}
View Source
var Tsizes = map[string]int{
	"s0": 1024,
	"s1": 4096,
	"s2": 9216,
	"s3": 25600,
	"s4": 65536,
	"s5": 193600,
	"s6": 577600,
	"s7": 1721344,
	"s8": 5062500,
	"s9": 14745600,
}

Functions

This section is empty.

Types

type ConfigContext added in v0.4.0

type ConfigContext interface {
	context.Context
	Config() *config.Config
}

type FrameDesc added in v0.5.6

type FrameDesc struct {
	Background []uint32     `json:"background"`
	BGimage    string       `json:"bgimage"`
	Color      []uint32     `json:"color"`
	Thickness  int          `json:"thickness"`
	Width      int          `json:"width"`
	Height     int          `json:"height"`
	X          int          `json:"x"`
	Y          int          `json:"y"`
	Text       *TextDesc    `json:"text"`
	Sub        []*FrameDesc `json:"sub"`
}

type FrameRenderRequest added in v0.5.6

type FrameRenderRequest struct {
	ID    *string
	Frame *FrameDesc
	Wg    sync.WaitGroup
}

type LoggerContext added in v0.4.0

type LoggerContext interface {
	context.Context
	Logger() *zap.SugaredLogger
}

type MetaDef added in v0.5.6

type MetaDef struct {
	H, W int
	Mime string
}

type NodeContext added in v0.4.0

type NodeContext interface {
	LoggerContext
	ConfigContext
}

func NewNodeContext added in v0.4.0

func NewNodeContext(ctx context.Context, log *zap.SugaredLogger, cfg *config.Config) (NodeContext, error)

type TextDesc added in v0.5.6

type TextDesc struct {
	String    string   `json:"string"`
	Fontname  string   `json:"fontfile"`
	Fontsize  float64  `json:"fontsize"`
	Fontcolor []uint32 `json:"fontcolor"`
	Wrap      bool     `json:"wrap"`
	PadX      int      `json:"padX"`
	PadY      int      `json:"padY"`
	AlignH    string   `json:"alignH"`
	AlignV    string   `json:"alignV"`
	DPI       float64  `json:"dpi"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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