Documentation
¶
Index ¶
- Variables
- type Buffer
- func (b *Buffer) Add(c ...Command)
- func (b *Buffer) Clip() Rect
- func (b *Buffer) Fill(r Rect, c Color)
- func (b *Buffer) Frame(r Rect, c Color, cr, th float64)
- func (b *Buffer) Icon(r Rect, id string, c Color)
- func (b *Buffer) Image(r Rect, i Drawable, c Color)
- func (b *Buffer) Pop()
- func (b *Buffer) Push(r Rect)
- func (b *Buffer) Reset(w, h float64)
- func (b *Buffer) Shadow(r Rect, c Color, size float64)
- func (b *Buffer) Size() (float64, float64)
- func (b *Buffer) SubImage(r Rect, i Drawable, sub Rect, c Color)
- func (b *Buffer) Text(x, y float64, text string, font Font, c Color, size float64)
- type Color
- type Command
- type CommandList
- type Drawable
- type Fill
- type Font
- type FontLookup
- type Frame
- type Icon
- type Image
- type Rect
- type Shadow
- type Text
- type TextMetrics
- type TextStyle
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Black = Color{0, 0, 0, 255} White = Color{255, 255, 255, 255} Transparent = Color{0, 0, 0, 0} )
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct { Commands []Command FontLookup All []CommandList // contains filtered or unexported fields }
A Buffer contains a list of commands.
func (*Buffer) Push ¶
Push constrains drawing to a rectangle. Subsequent operations will be translated and clipped. Subsequent calls to Size will return the rectangle's size.
type Color ¶
type Color [4]byte
Color is a 32 bit RGBA color with premultiplied alpha.
func Gray ¶
Gray creates an opaque gray color from an intensity in range [0,1], where 0 means black and 1 means white.
type CommandList ¶
type FontLookup ¶
type FontLookup interface { Measure(string, Font, float64) TextMetrics Index(string, float64, Font, float64) int }
A FontLookup provides information about fonts.
type Rect ¶
type Rect struct {
X, Y, W, H float64
}
type TextMetrics ¶
Click to show internal directories.
Click to hide internal directories.