Documentation ¶
Index ¶
- type Config
- type Logo
- func (l *Logo) GetThumbnail(ctx context.Context, size image.Rectangle) (image.Image, error)
- func (l *Logo) Key() string
- func (l *Logo) RenderLeftAligned(ctx context.Context, bounds image.Rectangle, endX int) (image.Image, error)
- func (l *Logo) RenderLeftAlignedWithStart(ctx context.Context, bounds image.Rectangle, startX int) (image.Image, error)
- func (l *Logo) RenderRightAligned(ctx context.Context, bounds image.Rectangle, startX int) (image.Image, error)
- func (l *Logo) RenderRightAlignedWithEnd(ctx context.Context, bounds image.Rectangle, endX int) (image.Image, error)
- func (l *Logo) SetLogger(logger *zap.Logger)
- func (l *Logo) ThumbnailFilename(size image.Rectangle) string
- type Pt
- type SourceGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Abbrev string `json:"abbrev"` Pt *Pt `json:"pt"` XSize int `json:"xSize"` YSize int `json:"ySize"` // FitImage determines if image scaling is based on bounds given // to render functions. Default of false uses the matrix bounds for scaling FitImage bool `json:"fit"` }
Config ...
type Logo ¶
type Logo struct {
// contains filtered or unexported fields
}
Logo is used to manage logo rendering
func New ¶
func New(key string, getter SourceGetter, targetDirectory string, matrixBounds image.Rectangle, conf *Config) *Logo
New ...
func (*Logo) GetThumbnail ¶
GetThumbnail returns the resized image
func (*Logo) RenderLeftAligned ¶
func (l *Logo) RenderLeftAligned(ctx context.Context, bounds image.Rectangle, endX int) (image.Image, error)
RenderLeftAligned renders the logo on the left side of the matrix
func (*Logo) RenderLeftAlignedWithStart ¶
func (l *Logo) RenderLeftAlignedWithStart(ctx context.Context, bounds image.Rectangle, startX int) (image.Image, error)
RenderLeftAlignedWithStart renders the logo on the left side of the matrix with a starting X point
func (*Logo) RenderRightAligned ¶
func (l *Logo) RenderRightAligned(ctx context.Context, bounds image.Rectangle, startX int) (image.Image, error)
RenderRightAligned renders the logo on the right side of the matrix
Click to show internal directories.
Click to hide internal directories.