images

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: EPL-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	ExpandImage(pathToFile string) error
	GetExpandedImageFileCount() int
}

func NewImageExpander

func NewImageExpander(fs spi.FileSystem, renderer ImageRenderer, forceOverwriteExistingFiles bool) ImageExpander

func NewImageExpanderNullImpl added in v0.33.0

func NewImageExpanderNullImpl() ImageExpander

type ImageExpanderImpl

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

******** A real implementation of an expander *******

func (*ImageExpanderImpl) ExpandImage added in v0.33.0

func (expander *ImageExpanderImpl) ExpandImage(filePath string) error

func (*ImageExpanderImpl) ExpandImages

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

func (*ImageExpanderImpl) GetExpandedImageFileCount

func (expander *ImageExpanderImpl) GetExpandedImageFileCount() int

type ImageExpanderNullImpl added in v0.33.0

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

********** A null implementation. Does nothing. ***********

func (*ImageExpanderNullImpl) ExpandImage added in v0.33.0

func (expander *ImageExpanderNullImpl) ExpandImage(filePath string) error

func (*ImageExpanderNullImpl) ExpandImages added in v0.33.0

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

func (*ImageExpanderNullImpl) GetExpandedImageFileCount added in v0.33.0

func (expander *ImageExpanderNullImpl) 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 spi.FileSystem, imageFolderPath string, forceOverwriteExistingFiles bool) 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