Package ui

Package ui defines lightweight, platform-neutral paint primitives.

Import path: import "github.com/vivaui/viva/ui"

Package ui defines lightweight, platform-neutral paint primitives.

Types

Functions

Lerp#

func Lerp(from, to, t float32) float32

Lerp interpolates from one scalar to another. t is clamped to [0, 1] and the end points are returned exactly, so a finished transition paints the same pixels as a static state.

MonoFamilyCount#

func MonoFamilyCount() int

MonoFamilyCount is how many named families have been registered, so a platform can tell cheaply that it has new ones to learn.

MonoFamilyName#

func MonoFamilyName(face MonoFace) string

MonoFamilyName is the family a face from MonoFamily stands for, or "" for the built-in faces and for a number no MonoFamily call returned.

Constants

const (
	WeightRegular  float32 = 0
	WeightMedium   float32 = 0.15
	WeightSemibold float32 = 0.23
	WeightBold     float32 = 0.40
)
const MaxMonoFamilies = 250

MaxMonoFamilies is how many named fixed-pitch families one process can use, besides the two built-in faces.