Documentation ¶
Index ¶
- Constants
- Variables
- func CreateSurface(width int, height int) *sdl.Surface
- func DecodeDMD(data []byte) ([]*sdl.Surface, error)
- func DecodeDMD1(data []byte) (*sdl.Surface, error)
- func NewTicker60Hz() *time.Ticker
- type Align
- type Blinker
- type Console
- type Display
- type DisplaySDL
- type FadeDir
- type Fader
- type Font
- type FontBitmap
- type FontTTF
- type Graphics
- type Handler
- type InfoTTF
- type Input
- type Key
- type Loader
- type Mach
- type OptionsMach
- type OptionsSDL
- type Slider
- type Tile
- type TileMap
Constants ¶
View Source
const ( RenderEvent = iota + 0x200 QuitEvent )
View Source
const (
SwitchOff = 0x10000
)
Variables ¶
View Source
var Load = &Loader{}
View Source
var NullHandler = nullHandler{}
View Source
var PaletteOrange = []color.RGBA{
{0, 0, 0, 0xff},
{15, 8, 0, 0xff},
{33, 17, 0, 0xff},
{51, 25, 0, 0xff},
{66, 33, 0, 0xff},
{84, 42, 0, 0xff},
{102, 51, 0, 0xff},
{117, 58, 0, 0xff},
{135, 67, 0, 0xff},
{153, 76, 0, 0xff},
{168, 84, 0, 0xff},
{186, 93, 0, 0xff},
{204, 102, 0, 0xff},
{219, 109, 0, 0xff},
{237, 118, 0, 0xff},
{255, 127, 0, 0xff},
}
View Source
var PaletteWhite = []color.RGBA{
{0, 0, 0, 0xff},
{15, 15, 15, 0xff},
{33, 33, 33, 0xff},
{51, 51, 51, 0xff},
{66, 66, 66, 0xff},
{84, 84, 84, 0xff},
{102, 102, 102, 0xff},
{117, 117, 117, 0xff},
{135, 135, 135, 0xff},
{153, 153, 153, 0xff},
{168, 168, 168, 0xff},
{186, 186, 186, 0xff},
{204, 204, 204, 0xff},
{219, 219, 219, 0xff},
{237, 237, 237, 0xff},
{255, 255, 255, 0xff},
}
Functions ¶
func NewTicker60Hz ¶
Types ¶
type DisplaySDL ¶
type DisplaySDL struct { Width int Height int Renderer *sdl.Renderer // contains filtered or unexported fields }
func NewDisplaySDL ¶
func NewDisplaySDL(mat *sdl.Surface, o OptionsSDL) (*DisplaySDL, error)
func (*DisplaySDL) Render ¶
func (d *DisplaySDL) Render()
type Fader ¶
type FontBitmap ¶
type FontBitmap struct {
// contains filtered or unexported fields
}
type Graphics ¶
type Graphics struct { X int Y int MatrixH int MatrixW int Color uint32 Align Align Width int Height int PaddingB int Font Font // contains filtered or unexported fields }
func NewGraphics ¶
type Mach ¶
type Mach struct { Matrix *sdl.Surface DMD Display VirtualDMD Display Handler Handler Inputs []Input KeyEvents bool Quit bool }
func NewMach ¶
func NewMach(opts OptionsMach) (*Mach, error)
type OptionsMach ¶
type OptionsMach struct {
VirtualDMD bool
}
type OptionsSDL ¶
type OptionsSDL struct { Scale int Padding int BackColor color.RGBA BorderColor color.RGBA BorderSize int Title string Palette []color.RGBA }
func DefaultOptionsSDL ¶
func DefaultOptionsSDL() OptionsSDL
Click to show internal directories.
Click to hide internal directories.