styles

package
v0.0.0-...-02623f6 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BLACK = color.NRGBA{R: 0x00, G: 0x00, B: 0x00, A: 0xff}
View Source
var GREEN = color.NRGBA{R: 0x00, G: 0x80, B: 0x00, A: 0xff}

Functions

This section is empty.

Types

type Fill

type Fill struct {
	Fill   string `json:"fill"`
	Colour string `json:"colour"`
	Alpha  uint8  `json:"alpha"`
}

func (*Fill) FillSpec

func (f *Fill) FillSpec() fills.FillSpec

func (*Fill) Set

func (f *Fill) Set(s string) error

func (Fill) String

func (f Fill) String() string

type Grid

type Grid struct {
	Grid    string `json:"grid"`
	Colour  string `json:"colour"`
	Alpha   uint8  `json:"alpha"`
	Size    string `json:"size"`
	WH      string `json:"wh"`
	Overlay bool   `json:"overlay"`
}

func (Grid) GridSpec

func (g Grid) GridSpec() grids.GridSpec

func (*Grid) Set

func (g *Grid) Set(s string) error

func (Grid) String

func (g Grid) String() string

type Scale

type Scale struct {
	Horizontal float64 `json:"horizontal"`
	Vertical   float64 `json:"vertical"`
}

func (*Scale) Set

func (s *Scale) Set(v string) error

func (Scale) String

func (s Scale) String() string

type Style

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

func NewStyle

func NewStyle() Style

func (Style) Fill

func (s Style) Fill() fills.FillSpec

func (Style) Grid

func (s Style) Grid() grids.GridSpec

func (Style) Height

func (s Style) Height() uint

func (Style) Load

func (s Style) Load(style string) (Style, error)

func (Style) Name

func (s Style) Name() string

func (Style) Padding

func (s Style) Padding() int

func (Style) Renderer

func (s Style) Renderer() renderers.Renderer

func (Style) Scale

func (s Style) Scale() Scale

func (Style) Width

func (s Style) Width() uint

func (Style) WithFill

func (s Style) WithFill(fill Fill) Style

func (Style) WithGrid

func (s Style) WithGrid(grid Grid) Style

func (Style) WithHeight

func (s Style) WithHeight(height uint) Style

func (Style) WithPadding

func (s Style) WithPadding(padding int) Style

func (Style) WithScale

func (s Style) WithScale(scale Scale) Style

func (Style) WithWidth

func (s Style) WithWidth(width uint) Style

Jump to

Keyboard shortcuts

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