control

package
v0.0.0-...-7a8c1c4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Left   HorizontalAlign = "left"
	Center                 = "center"
	Right                  = "right"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Badge

type Badge struct {
	Control
	AlignH        HorizontalAlign
	Label         string
	LabelFontFace font.Face
	Value         string
	ValueFontFace font.Face
}

func (*Badge) Draw

func (b *Badge) Draw() image.Image

type Button

type Button struct {
	Control
	AlignH       HorizontalAlign
	Text         string
	TextFontFace font.Face
}

func (*Button) Draw

func (b *Button) Draw() image.Image

func (*Button) DrawOnContext

func (b *Button) DrawOnContext(ctx *gg.Context, x, y int)

type Control

type Control struct {
	BorderRadius int
	Padding      image.Point // Support just equal padding? should it be top/bottom, left/right, same for margin below
	Size         image.Point
	Ink          color.Color
	Paper        color.Color
}

type HorizontalAlign

type HorizontalAlign string

Jump to

Keyboard shortcuts

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