Documentation
¶
Index ¶
- Variables
- func DrawText(text []string, rect image.Rectangle, bg *image.Uniform) *image.NRGBA
- func ReflowText(txt string) []string
- type BGR8
- func (p *BGR8) At(x, y int) color.Color
- func (p *BGR8) BGR8At(x, y int) ColorBGR8
- func (p *BGR8) Bounds() image.Rectangle
- func (p *BGR8) ColorModel() color.Model
- func (p *BGR8) NRGBAAt(x, y int) color.NRGBA
- func (p *BGR8) Opaque() bool
- func (p *BGR8) PixOffset(x, y int) int
- func (p *BGR8) RGBA64At(x, y int) color.RGBA64
- func (p *BGR8) Set(x, y int, c color.Color)
- func (p *BGR8) SetNRGBA(x, y int, c color.NRGBA)
- func (p *BGR8) SetRGBA64(x, y int, c color.RGBA64)
- func (p *BGR8) SubImage(r image.Rectangle) image.Image
- type ColorBGR8
- type DisplayError
- type MiSTerDisplay
- type UdpDisplayClient
- func (client *UdpDisplayClient) Close()
- func (client *UdpDisplayClient) CmdBlit(frameBuffer []byte)
- func (client *UdpDisplayClient) CmdClose()
- func (client *UdpDisplayClient) CmdInit()
- func (client *UdpDisplayClient) CmdSwitchres()
- func (client *UdpDisplayClient) Open()
- func (client *UdpDisplayClient) SendMTU(buffer []byte)
- func (client *UdpDisplayClient) SendPacket(buffer []byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var BGR8BytesPerPixel int = 3
View Source
var BGR8Model color.Model = color.ModelFunc(bgr8Model)
View Source
var PtSansRegular *truetype.Font = parseFont(ptSansRegular)
Functions ¶
func ReflowText ¶
Types ¶
type BGR8 ¶
type BGR8 struct {
// Pix holds the image's pixels, in R, G, B, A order. The pixel at
// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4].
Pix []uint8
// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
Stride int
// Rect is the image's bounds.
Rect image.Rectangle
}
BGR8 is an in-memory image whose At method returns color.BGR8 values.
func TextToBGR8 ¶
func (*BGR8) ColorModel ¶
type DisplayError ¶
type DisplayError struct {
// contains filtered or unexported fields
}
func NewDisplayError ¶
func NewDisplayError(err error) DisplayError
func (*DisplayError) Error ¶
func (err *DisplayError) Error() string
type MiSTerDisplay ¶
type MiSTerDisplay struct {
IsRunning bool
Client *UdpDisplayClient
StartChan chan bool
StopChan chan bool
Ticker *time.Ticker
Timer *time.Timer
Frame *BGR8
}
func NewMiSTerDisplay ¶
func NewMiSTerDisplay(host string) *MiSTerDisplay
func (*MiSTerDisplay) BlitText ¶
func (disp *MiSTerDisplay) BlitText(txt []string)
func (*MiSTerDisplay) SafeClose ¶
func (disp *MiSTerDisplay) SafeClose()
func (*MiSTerDisplay) SafeOpen ¶
func (disp *MiSTerDisplay) SafeOpen()
type UdpDisplayClient ¶
type UdpDisplayClient struct {
// contains filtered or unexported fields
}
func NewUdpClient ¶
func NewUdpClient(host string) *UdpDisplayClient
func (*UdpDisplayClient) Close ¶
func (client *UdpDisplayClient) Close()
func (*UdpDisplayClient) CmdBlit ¶
func (client *UdpDisplayClient) CmdBlit(frameBuffer []byte)
func (*UdpDisplayClient) CmdClose ¶
func (client *UdpDisplayClient) CmdClose()
func (*UdpDisplayClient) CmdInit ¶
func (client *UdpDisplayClient) CmdInit()
func (*UdpDisplayClient) CmdSwitchres ¶
func (client *UdpDisplayClient) CmdSwitchres()
func (*UdpDisplayClient) Open ¶
func (client *UdpDisplayClient) Open()
func (*UdpDisplayClient) SendMTU ¶
func (client *UdpDisplayClient) SendMTU(buffer []byte)
func (*UdpDisplayClient) SendPacket ¶
func (client *UdpDisplayClient) SendPacket(buffer []byte)
Click to show internal directories.
Click to hide internal directories.