Version: v0.0.0-...-1a7aca4 Latest Latest

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

Go to latest
Published: Jun 16, 2018 License: MIT Imports: 1 Imported by: 0



Package logo contains logos that can be used with a framebuffer console.



This section is empty.


This section is empty.


This section is empty.


type Alignment

type Alignment uint8

Alignment defines the supported horizontal alignments for a console logo.

const (
	// AlignLeft aligns the logo to the left side of the console.
	AlignLeft Alignment = iota

	// AlignCenter aligns the logo to the center of the console.

	// AlignRight aligns the logo to the right side of the console.

type Image

type Image struct {
	// The width and height of the logo in pixels.
	Width  uint32
	Height uint32

	// Align specifies the horizontal alignment for the logo.
	Align Alignment

	// TransparentIndex defines a color index that will be treated as
	// transparent when drawing the logo.
	TransparentIndex uint8

	// The palette for the logo. The console remaps the palette
	// entries to the end of its own palette.
	Palette []color.RGBA

	// The logo data comprises of Width*Height bytes where each byte
	// represents an index in the logo palette.
	Data []uint8

Image describes an 8bpp image with

func BestFit

func BestFit(consoleWidth, consoleHeight uint32) *Image

BestFit returns the best logo from the available logo list given the specified console dimensions.

Jump to

Keyboard shortcuts

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