Documentation
¶
Index ¶
- func BuildColorGradient(startColor, endColor screen.Color, steps int) []screen.Color
- func BuildColorGradientMatrix(topLeft, topRight, bottomLeft, bottomRight screen.Color, ...) [][]screen.Color
- func ColorToColorful(color screen.Color) colorful.Color
- func DrawColorFrame(o screen.ColorSetter, row, col, height, width int, color screen.Color)
- func DrawColorGradientFrame(colorsetter screen.ColorSetter, row, col, height, width int, ...)
- func DrawColorGradientsMatrix(colorcanvas screen.ColorSetter, row, col, height, width int, ...)
- func DrawColorPattern(row, col int, colorPattern string, colorsetter screen.ColorSetter, ...)
- func DrawFrame(o screen.RuneSetter, row, col, height, width int, patternIndex int)
- func DrawHorizontalLine(runes screen.RuneSetter, foreground screen.ColorSetter, ...)
- func DrawRawString(s string, row, col int, runesetter screen.RuneSetter) int
- func DrawRuneFrame(o screen.RuneSetter, row, col, height, width int, ru rune)
- func DrawShadow(screenbuffer *screen.Buffer, stencil *screen.Stencil, ...)
- func DrawStyledString(row, col int, text string, canvas ICanvas, defaultStyle screen.Style, ...) int
- func FillRectangle(runes screen.RuneSetter, foreground screen.ColorSetter, ...)
- func GetStyledStringLen(text string) int
- type BoxPattern
- type ChromaticFilter
- func (o *ChromaticFilter) Clear()
- func (o *ChromaticFilter) Height() int
- func (o *ChromaticFilter) Render(b *screen.Buffer, stencil *screen.Stencil, position screen.Coordinates, ...)
- func (o *ChromaticFilter) Resize(height int, width int)
- func (o *ChromaticFilter) SetHeight(height int)
- func (o *ChromaticFilter) SetWidth(width int)
- func (o *ChromaticFilter) Width() int
- type ComboCanvas
- func (o *ComboCanvas) Clear()
- func (o *ComboCanvas) GetBColorCanvas() *screen.BColorCanvas
- func (o *ComboCanvas) GetEmphasisCanvas() *screen.EmphasisCanvas
- func (o *ComboCanvas) GetFColorCanvas() *screen.FColorCanvas
- func (o *ComboCanvas) GetOrigins() screen.Coordinates
- func (o *ComboCanvas) GetRuneCanvas() *screen.RuneCanvas
- func (o *ComboCanvas) GetStencil() *screen.Stencil
- func (o *ComboCanvas) Height() int
- func (o *ComboCanvas) Render(b *screen.Buffer, stencil *screen.Stencil, position screen.Coordinates, ...)
- func (o *ComboCanvas) Resize(height int, width int)
- func (o *ComboCanvas) SetDefaults(r rune, style screen.Style)
- func (o *ComboCanvas) SetHeight(height int)
- func (o *ComboCanvas) SetWidth(width int)
- func (o *ComboCanvas) String() string
- func (o *ComboCanvas) Width() int
- type ConsoleImage
- func (o *ConsoleImage) Draw(runes screen.RuneSetter, foreground screen.ColorSetter, ...)
- func (o *ConsoleImage) DrawOnCells(colorground screen.ColorSetter, row, col int)
- func (o *ConsoleImage) DrawOnCellsWithAlpha(colorground screen.ColorSetter, row, col int, alpha uint8)
- func (o *ConsoleImage) DrawWithAlpha(runes screen.RuneSetter, foreground screen.ColorSetter, ...)
- func (o *ConsoleImage) Resize(wantedHeight, wantedWidth int) (int, int)
- type ICanvas
- type ICombosCanvas
- type IHasRuneCanvas
- type IStencil
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildColorGradient ¶
func DrawColorFrame ¶
func DrawColorFrame(o screen.ColorSetter, row, col, height, width int, color screen.Color)
func DrawColorGradientFrame ¶
func DrawColorGradientFrame(colorsetter screen.ColorSetter, row, col, height, width int, topLeft, topRight, bottomLeft, bottomRight screen.Color)
func DrawColorGradientsMatrix ¶
func DrawColorGradientsMatrix(colorcanvas screen.ColorSetter, row, col, height, width int, topLeft, topRight, bottomLeft, bottomRight screen.Color)
func DrawColorPattern ¶
func DrawHorizontalLine ¶
func DrawHorizontalLine(runes screen.RuneSetter, foreground screen.ColorSetter, background screen.ColorSetter, row, col, width int, ru rune, fcolor screen.Color, bcolor screen.Color)
func DrawRawString ¶
func DrawRawString(s string, row, col int, runesetter screen.RuneSetter) int
func DrawRuneFrame ¶
func DrawRuneFrame(o screen.RuneSetter, row, col, height, width int, ru rune)
func DrawShadow ¶
func DrawShadow(screenbuffer *screen.Buffer, stencil *screen.Stencil, position screen.Coordinates, rowOffset, colOffset int, shadowDensity uint8)
DrawShadow paint a shadow directly to the screenBuffer
func DrawStyledString ¶
func FillRectangle ¶
func FillRectangle(runes screen.RuneSetter, foreground screen.ColorSetter, background screen.ColorSetter, row, col, height, width int, ru rune, fcolor screen.Color, bcolor screen.Color)
func GetStyledStringLen ¶
Types ¶
type BoxPattern ¶
type ChromaticFilter ¶
type ChromaticFilter struct {
*screen.Size
*screen.FColorCanvas
*screen.BColorCanvas
*screen.Stencil
}
ChromaticFilter
func NewChromaticFilter ¶
func NewChromaticFilter(stencil *screen.Stencil, color screen.Color) *ChromaticFilter
func (*ChromaticFilter) Clear ¶
func (o *ChromaticFilter) Clear()
func (*ChromaticFilter) Height ¶
func (o *ChromaticFilter) Height() int
func (*ChromaticFilter) Render ¶
func (o *ChromaticFilter) Render(b *screen.Buffer, stencil *screen.Stencil, position screen.Coordinates, offset screen.Coordinates)
func (*ChromaticFilter) Resize ¶
func (o *ChromaticFilter) Resize(height int, width int)
func (*ChromaticFilter) SetHeight ¶
func (o *ChromaticFilter) SetHeight(height int)
func (*ChromaticFilter) SetWidth ¶
func (o *ChromaticFilter) SetWidth(width int)
func (*ChromaticFilter) Width ¶
func (o *ChromaticFilter) Width() int
type ComboCanvas ¶
type ComboCanvas struct {
*screen.Size
//Position
Origins screen.Coordinates
*screen.RuneCanvas
*screen.EmphasisCanvas
*screen.FColorCanvas
*screen.BColorCanvas
*screen.Stencil
}
ComboCanvas is a Combined Canvas Type 1.
func NewComboCanvas ¶
func NewComboCanvas(height int, width int) *ComboCanvas
func (*ComboCanvas) Clear ¶
func (o *ComboCanvas) Clear()
func (*ComboCanvas) GetBColorCanvas ¶
func (o *ComboCanvas) GetBColorCanvas() *screen.BColorCanvas
func (*ComboCanvas) GetEmphasisCanvas ¶
func (o *ComboCanvas) GetEmphasisCanvas() *screen.EmphasisCanvas
func (*ComboCanvas) GetFColorCanvas ¶
func (o *ComboCanvas) GetFColorCanvas() *screen.FColorCanvas
func (*ComboCanvas) GetOrigins ¶
func (o *ComboCanvas) GetOrigins() screen.Coordinates
func (*ComboCanvas) GetRuneCanvas ¶
func (o *ComboCanvas) GetRuneCanvas() *screen.RuneCanvas
func (o *ComboCanvas) GetCanvas() (*screen.RuneCanvas, *screen.FColorCanvas, *screen.BColorCanvas, *screen.EmphasisCanvas) {
return o.RuneCanvas, o.FColorCanvas, o.BColorCanvas, o.EmphasisCanvas
}
func (*ComboCanvas) GetStencil ¶
func (o *ComboCanvas) GetStencil() *screen.Stencil
func (*ComboCanvas) Height ¶
func (o *ComboCanvas) Height() int
func (*ComboCanvas) Render ¶
func (o *ComboCanvas) Render(b *screen.Buffer, stencil *screen.Stencil, position screen.Coordinates, offset screen.Coordinates)
func (*ComboCanvas) Resize ¶
func (o *ComboCanvas) Resize(height int, width int)
func (*ComboCanvas) SetDefaults ¶
func (o *ComboCanvas) SetDefaults(r rune, style screen.Style)
func (*ComboCanvas) SetHeight ¶
func (o *ComboCanvas) SetHeight(height int)
func (*ComboCanvas) SetWidth ¶
func (o *ComboCanvas) SetWidth(width int)
func (*ComboCanvas) String ¶
func (o *ComboCanvas) String() string
func (*ComboCanvas) Width ¶
func (o *ComboCanvas) Width() int
type ConsoleImage ¶
type ConsoleImage struct {
// contains filtered or unexported fields
}
TODO Add error management, w,h=0 (input or calculated), Image=nil, ...
func NewConsoleImage ¶
func NewConsoleImage(img image.Image, height, width int) *ConsoleImage
func (*ConsoleImage) Draw ¶
func (o *ConsoleImage) Draw(runes screen.RuneSetter, foreground screen.ColorSetter, background screen.ColorSetter, row, col int)
func (*ConsoleImage) DrawOnCells ¶
func (o *ConsoleImage) DrawOnCells(colorground screen.ColorSetter, row, col int)
func (*ConsoleImage) DrawOnCellsWithAlpha ¶
func (o *ConsoleImage) DrawOnCellsWithAlpha(colorground screen.ColorSetter, row, col int, alpha uint8)
func (*ConsoleImage) DrawWithAlpha ¶
func (o *ConsoleImage) DrawWithAlpha(runes screen.RuneSetter, foreground screen.ColorSetter, background screen.ColorSetter, row, col int, alpha uint8)
type ICanvas ¶
type ICanvas interface {
SetDefaults(rune, screen.Style)
Clear()
GetRuneCanvas() *screen.RuneCanvas
GetFColorCanvas() *screen.FColorCanvas
GetBColorCanvas() *screen.BColorCanvas
GetEmphasisCanvas() *screen.EmphasisCanvas
GetStencil() *screen.Stencil
GetOrigins() screen.Coordinates
}
type ICombosCanvas ¶
type IHasRuneCanvas ¶
type IHasRuneCanvas interface {
GetRuneCanvas() *screen.RuneCanvas
Clear()
}
Click to show internal directories.
Click to hide internal directories.