images

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: EPL-2.0 Imports: 21 Imported by: 0

Documentation

Overview

* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0

* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0

* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0

* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0

* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0

* Copyright contributors to the Galasa project * * SPDX-License-Identifier: EPL-2.0

Index

Constants

View Source
const (
	PRIMARY_FONT_DIRECTORY  = "fonts/primary"
	FALLBACK_FONT_DIRECTORY = "fonts/fallbacks"
)
View Source
const (
	// 20 seconds
	DEFAULT_MILLISECS_BETWEEN_POLLS = 20 * 1000
)

Variables

View Source
var (
	DEFAULT_COLOR = color.RGBA{0, 255, 0, 255}
	NEUTRAL       = color.RGBA{255, 255, 255, 255}
	RED           = color.RGBA{255, 0, 0, 255}
	GREEN         = color.RGBA{0, 255, 0, 255}
	BLUE          = color.RGBA{0, 0, 255, 255}
	PINK          = color.RGBA{255, 0, 204, 255}
	TURQUOISE     = color.RGBA{64, 224, 208, 255}
	YELLOW        = color.RGBA{255, 255, 0, 255}
)

Functions

This section is empty.

Types

type FallbackFontFace

type FallbackFontFace struct {
	// contains filtered or unexported fields
}

Implementation of the font.Face interface

func NewFallbackFontFace

func NewFallbackFontFace(primaryFont font.Face) *FallbackFontFace

func (*FallbackFontFace) AddFallbackFont

func (f *FallbackFontFace) AddFallbackFont(fontFace font.Face)

func (*FallbackFontFace) Close

func (f *FallbackFontFace) Close() error

---------------------------------------------- Functions implementing the font.Face interface ----------------------------------------------

func (*FallbackFontFace) Glyph

func (*FallbackFontFace) GlyphAdvance

func (f *FallbackFontFace) GlyphAdvance(r rune) (fixed.Int26_6, bool)

func (*FallbackFontFace) GlyphBounds

func (f *FallbackFontFace) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool)

func (*FallbackFontFace) Kern

func (f *FallbackFontFace) Kern(r0 rune, r1 rune) fixed.Int26_6

func (*FallbackFontFace) Metrics

func (f *FallbackFontFace) Metrics() font.Metrics

type FieldContents

type FieldContents struct {
	Characters []string `json:"chars"`
	Text       string   `json:"text"`
}

type ImageExpander

type ImageExpander interface {
	ExpandImages(rootFolderPath string) error
	GetExpandedImageFileCount() int
}

func NewImageExpander

func NewImageExpander(fs files.FileSystem, renderer ImageRenderer) ImageExpander

type ImageExpanderImpl

type ImageExpanderImpl struct {
	// contains filtered or unexported fields
}

func (*ImageExpanderImpl) ExpandImages

func (expander *ImageExpanderImpl) ExpandImages(rootFolderPath string) error

func (*ImageExpanderImpl) GetExpandedImageFileCount

func (expander *ImageExpanderImpl) GetExpandedImageFileCount() int

type ImageFileWriter

type ImageFileWriter interface {
	WriteImageFile(simpleFileName string, imageBytes []byte) error
	GetImageFilesWrittenCount() int
	IsImageFileWritable(simpleFileName string) (bool, error)
}

func NewImageFileWriter

func NewImageFileWriter(fs files.FileSystem, imageFolderPath string) ImageFileWriter

type ImageFileWriterImpl

type ImageFileWriterImpl struct {
	// contains filtered or unexported fields
}

func (*ImageFileWriterImpl) GetImageFilesWrittenCount

func (writer *ImageFileWriterImpl) GetImageFilesWrittenCount() int

func (*ImageFileWriterImpl) IsImageFileWritable

func (writer *ImageFileWriterImpl) IsImageFileWritable(simpleFileName string) (bool, error)

func (*ImageFileWriterImpl) WriteImageFile

func (writer *ImageFileWriterImpl) WriteImageFile(simpleFileName string, imageBytes []byte) error

type ImageRenderer

type ImageRenderer interface {
	RenderJsonBytesToImageFiles(jsonBinary []byte, writer ImageFileWriter) error
}

type ImageRendererImpl

type ImageRendererImpl struct {
	// contains filtered or unexported fields
}

func (*ImageRendererImpl) RenderJsonBytesToImageFiles

func (renderer *ImageRendererImpl) RenderJsonBytesToImageFiles(jsonBinary []byte, writer ImageFileWriter) error

type PollingJob

type PollingJob interface {
	Start()
	Stop()
}

func NewPollingJob

func NewPollingJob(jobName string, milliSecondsBetweenPolls int, functionToCall func() error) PollingJob

type PollingJobImpl

type PollingJobImpl struct {
	// contains filtered or unexported fields
}

func (*PollingJobImpl) Start

func (job *PollingJobImpl) Start()

func (*PollingJobImpl) Stop

func (job *PollingJobImpl) Stop()

type Terminal

type Terminal struct {
	Id          string          `json:"id"`
	RunId       string          `json:"runId"`
	Sequence    int             `json:"sequence"`
	Images      []TerminalImage `json:"images"`
	DefaultSize TerminalSize    `json:"defaultSize"`
}

type TerminalField

type TerminalField struct {
	Row                 int             `json:"row"`
	Column              int             `json:"column"`
	Unformatted         bool            `json:"unformatted"`
	FieldProtected      bool            `json:"fieldProtected"`
	FieldNumeric        bool            `json:"fieldNumeric"`
	FieldDisplay        bool            `json:"fieldDisplay"`
	FieldIntenseDisplay bool            `json:"fieldIntenseDisplay"`
	FieldSelectorPen    bool            `json:"fieldSelectorPen"`
	FieldModified       bool            `json:"fieldModified"`
	ForegroundColor     string          `json:"foregroundColour"`
	BackgroundColor     string          `json:"backgroundColour"`
	Highlight           string          `json:"highlight"`
	Contents            []FieldContents `json:"contents"`
}

type TerminalImage

type TerminalImage struct {
	Id           string          `json:"id"`
	Sequence     int             `json:"sequence"`
	Inbound      bool            `json:"inbound"`
	Type         string          `json:"type"`
	ImageSize    TerminalSize    `json:"imageSize"`
	CursorRow    int             `json:"cursorRow"`
	CursorColumn int             `json:"cursorColumn"`
	Aid          string          `json:"aid"`
	Fields       []TerminalField `json:"fields"`
}

type TerminalSize

type TerminalSize struct {
	Rows    int `json:"rows"`
	Columns int `json:"columns"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL