vgui

package
v0.0.0-...-ab78217 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

font

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment int32
const (
	// Horizontal alignment:
	AlignLeft Alignment = 1 << iota
	AlignCenter
	AlignRight
	// Vertical alignment:
	AlignTop
	AlignMiddle
	AlignBottom
)

type Color

type Color uint32

func RGB

func RGB(r, g, b uint8) Color

func RGBA

func RGBA(r, g, b, a uint8) Color

func (Color) UInt32

func (c Color) UInt32() uint32

type Font

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

func NewSansFont

func NewSansFont() *Font

type PaletteIndex

type PaletteIndex int

type Point

type Point struct {
	X float32
	Y float32
}

type PreparedText

type PreparedText struct {
	String string
	// contains filtered or unexported fields
}

type Touch

type Touch struct {
	Point
	ID int32
}

type UI

type UI struct {
	Touches []Touch
	// contains filtered or unexported fields
}

func NewUI

func NewUI() *UI

func (*UI) Arc

func (u *UI) Arc(p Point, r, a0, a1 float32)

Angles in radians, 0 is horizontal extending right.

func (*UI) BeginFrame

func (ui *UI) BeginFrame()

func (*UI) BeginPath

func (u *UI) BeginPath()

func (*UI) Button

func (ui *UI) Button(w Window, depressed bool, label *PreparedText) *Touch

func (*UI) Circle

func (u *UI) Circle(p Point, r float32)

func (*UI) Dial

func (ui *UI) Dial(w Window, label *PreparedText, value float32, valueStr *PreparedText) (Window, *Touch)

func (*UI) EndFrame

func (ui *UI) EndFrame()

func (*UI) EndPath

func (u *UI) EndPath()

func (*UI) Fill

func (u *UI) Fill()

func (*UI) FillAndStroke

func (u *UI) FillAndStroke()

func (*UI) FillColor

func (u *UI) FillColor(c Color)

func (*UI) FontFace

func (u *UI) FontFace(name string)

func (*UI) FontSize

func (u *UI) FontSize() float32

func (*UI) Init

func (ui *UI) Init()

func (*UI) Label

func (ui *UI) Label(w Window, t *PreparedText, align Alignment)

func (*UI) LineCap

func (u *UI) LineCap(style vg.CapStyleEnum)

func (*UI) MiterLimit

func (u *UI) MiterLimit(limit float32)

func (*UI) Palette

func (u *UI) Palette(p PaletteIndex) Color

func (*UI) Pane

func (ui *UI) Pane(w Window)

func (*UI) PrepareText

func (ui *UI) PrepareText(s string) *PreparedText

func (*UI) Rect

func (u *UI) Rect(w Window)

func (*UI) Restore

func (u *UI) Restore()

func (*UI) RoundedRect

func (u *UI) RoundedRect(w Window, radius float32)

func (*UI) Save

func (u *UI) Save()

func (*UI) SetFontSize

func (u *UI) SetFontSize(size float32)

func (*UI) SetWindow

func (u *UI) SetWindow(w Window)

func (*UI) Stroke

func (u *UI) Stroke()

func (*UI) StrokeColor

func (u *UI) StrokeColor(c Color)

func (*UI) StrokeWidth

func (u *UI) StrokeWidth(size float32)

func (*UI) Text

func (u *UI) Text(w Window, size float32, align Alignment, t *PreparedText)

func (*UI) TextPoint

func (u *UI) TextPoint(p Point, size float32, align Alignment, t *PreparedText)

func (*UI) Window

func (u *UI) Window() Window

type UIPalette

type UIPalette [5]Color

type Window

type Window struct {
	X float32
	Y float32
	W float32
	H float32
}

func NewWindow

func NewWindow(x, y, w, h float32) Window

func (Window) AlignedPoint

func (w Window) AlignedPoint(align Alignment) Point

func (Window) Inner

func (n Window) Inner(l, t, r, b float32) Window

func (Window) IsPointInside

func (w Window) IsPointInside(p Point) bool

func (Window) RadiusMin

func (w Window) RadiusMin() float32

func (Window) SplitH

func (n Window) SplitH(t float32) (top Window, bottom Window)

func (Window) SplitV

func (n Window) SplitV(l float32) (left Window, right Window)

Jump to

Keyboard shortcuts

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