Documentation ¶
Index ¶
- Constants
- type ClearLineMode
- type ClearMode
- type Color
- type Graphics
- func (g *Graphics) ClearLine(mode clearLineMode)
- func (g *Graphics) ClearScreen(mode ClearMode)
- func (g *Graphics) DrawRectangle(x, y, width, height int, symbol rune) error
- func (g *Graphics) PrintAt(x, y int, s string, restorePosition bool)
- func (g *Graphics) ResetBackgroundColor()
- func (g *Graphics) ResetForegroundColor()
- func (g *Graphics) SetBackgroundColor(color Color)
- func (g *Graphics) SetForegroundColor(color Color)
- func (g *Graphics) SetGraphics(modes ...GraphicsMode)
- type GraphicsMode
Constants ¶
View Source
const ( ResetGraphics graphicsMode = 0 Bold graphicsMode = 1 // increase brightness Faded graphicsMode = 2 // lower brightness Italics graphicsMode = 3 Underlined graphicsMode = 4 SlowFlashing graphicsMode = 5 FastFlashing graphicsMode = 6 Negative graphicsMode = 7 Hidden graphicsMode = 8 CrossedOut graphicsMode = 9 DefaultFont graphicsMode = 10 AlternativeFont graphicsMode = 11 // plus 1 - 2 alt font - not checked BoldAndUnderlined graphicsMode = 21 ResetBoldAndBrightness graphicsMode = 22 ResetItalics graphicsMode = 23 ResetUnderlined graphicsMode = 24 ResetFlashing graphicsMode = 25 ResetNegative graphicsMode = 27 ResetHidden graphicsMode = 28 ResetCrossedOut graphicsMode = 29 ResetForegroundColor graphicsMode = 39 ResetBackgroundColor graphicsMode = 49 )
View Source
const ( Black color = 0 Red color = 1 Green color = 2 Yellow color = 3 Blue color = 4 Magenta color = 5 Cyan color = 6 White color = 7 NoColor color = 8 )
View Source
const ( ClearAfterCursor clearMode = 0 // 0 - clears all from cursors position to the end of terminal ClearBeforeCursor clearMode = 1 // 1 - clears all from cursors position to the start of terminal ClearAll clearMode = 2 // 2 - clears all )
View Source
const ( ClearLineAfterCursor clearLineMode = 0 // 0 - clears all from cursors position to the end of Line ClearLineBeforeCursor clearLineMode = 1 // 1 - clears all from cursors position to the start of line ClearAllLine clearLineMode = 2 // 2 - clears all line )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClearLineMode ¶
type ClearLineMode interface {
// contains filtered or unexported methods
}
type Graphics ¶
type Graphics struct { types.ConsoleStream cursor.Cursor // contains filtered or unexported fields }
func (*Graphics) ClearScreen ¶
func (*Graphics) DrawRectangle ¶
func (*Graphics) ResetBackgroundColor ¶
func (g *Graphics) ResetBackgroundColor()
func (*Graphics) ResetForegroundColor ¶
func (g *Graphics) ResetForegroundColor()
func (*Graphics) SetBackgroundColor ¶
func (*Graphics) SetForegroundColor ¶
func (*Graphics) SetGraphics ¶
func (g *Graphics) SetGraphics(modes ...GraphicsMode)
type GraphicsMode ¶
type GraphicsMode interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.