Documentation ¶
Overview ¶
A screen represents a complete rectangular area which presents data.
This might be a frame buffer or background image.
The screen is rendered by pasting panels on it. This is done it two stages:
- Initial creation - Rendering dynamic content
Perhaps use MapFS for storing temp files
Index ¶
- Variables
- func FillPhotoIDChan(ctx context.Context)
- func GetClient() (*api.ClientWithResponses, error)
- func GetImage(ctx context.Context) (image.Image, error)
- func GetPhotoList(ctx context.Context) ([]string, error)
- func NewImage(ctx context.Context, bounds image.Rectangle) (image.Image, error)
- func NewPhotoPrism(ctx context.Context) (err error)
- func ScaleImage(img image.Image, dstBounds image.Rectangle, fit bool) image.Image
- type Page
- type Panelled
- type PictureFrame
- func (pf *PictureFrame) AddPanel(panel Panelled) error
- func (pf *PictureFrame) RenderPanels() error
- func (pf *PictureFrame) RenderPhotoPrism() error
- func (pf *PictureFrame) RepaintBackground()
- func (pf *PictureFrame) SetBGColour(r, g, b uint8)
- func (pf *PictureFrame) SetupBoundedStaticImage()
- func (pf *PictureFrame) SetupFullPhotoPrism() (err error)
- func (pf *PictureFrame) SetupFullStaticImage()
Constants ¶
This section is empty.
Variables ¶
var ( GlobalPage = Page{Title: "Album show", ImageName: "TBC"} GlobalPhotoList []string GlobalPhotoIDChan = make(chan string, 20) )
Functions ¶
func FillPhotoIDChan ¶
Fill channels with photo ids. Keep going until context is cancelled use channel to slow down the process Once album is exhausted it restarts at the begining
func GetClient ¶
func GetClient() (*api.ClientWithResponses, error)
func GetPhotoList ¶
Search for first album then search for first 10 pictures in that album then retrun that as a list
Types ¶
type PictureFrame ¶
type PictureFrame struct { // config Bounds image.Rectangle Buffer *image.RGBA // This is what is output to the screen via the frame buffer BGColour color.RGBA CropPoint image.Point // contains filtered or unexported fields }
This is the structure which holds the screen data.
func NewPictureFrame ¶
func NewPictureFrame(bounds image.Rectangle) *PictureFrame
Create a new picture frame at a defined size, eg defined by browser window for frame size
func (*PictureFrame) AddPanel ¶
func (pf *PictureFrame) AddPanel(panel Panelled) error
func (*PictureFrame) RenderPanels ¶
func (pf *PictureFrame) RenderPanels() error
Calls all the child panels to rerender them
func (*PictureFrame) RenderPhotoPrism ¶
func (pf *PictureFrame) RenderPhotoPrism() error
Get latest picture and render
func (*PictureFrame) RepaintBackground ¶
func (pf *PictureFrame) RepaintBackground()
func (*PictureFrame) SetBGColour ¶
func (pf *PictureFrame) SetBGColour(r, g, b uint8)
func (*PictureFrame) SetupBoundedStaticImage ¶
func (pf *PictureFrame) SetupBoundedStaticImage()
func (*PictureFrame) SetupFullPhotoPrism ¶
func (pf *PictureFrame) SetupFullPhotoPrism() (err error)
Setup pictures to pull
func (*PictureFrame) SetupFullStaticImage ¶
func (pf *PictureFrame) SetupFullStaticImage()