Documentation
¶
Index ¶
- func GetLines(s string) (lines []string, widest int)
- func PlaceOverlay(x, y int, fg, bg string, shadow bool, opts ...WhitespaceOption) string
- func PlaceOverlayWithPosition(position OverlayPosition, fullWidth, fullHeight int, fg, bg string, ...) string
- func PlaceOverlayWithPositionAndPadding(position OverlayPosition, fullWidth, fullHeight int, ...) string
- type OverlayPosition
- type WhitespaceOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLines ¶
GetLines Split a string into lines, additionally returning the size of the widest line.
func PlaceOverlay ¶
func PlaceOverlay( x, y int, fg, bg string, shadow bool, opts ...WhitespaceOption, ) string
PlaceOverlay places fg on top of bg.
func PlaceOverlayWithPosition ¶
func PlaceOverlayWithPosition( position OverlayPosition, fullWidth, fullHeight int, fg, bg string, shadow bool, opts ...WhitespaceOption, ) string
func PlaceOverlayWithPositionAndPadding ¶
func PlaceOverlayWithPositionAndPadding( position OverlayPosition, fullWidth, fullHeight int, horizontalPadding, verticalPadding int, fg, bg string, shadow bool, opts ...WhitespaceOption, ) string
PlaceOverlayWithPosition places fg on top of bg with overlay position
Types ¶
type OverlayPosition ¶
type OverlayPosition string
const ( OverlayPositionCenter OverlayPosition = "center" OverlayPositionTopRight OverlayPosition = "topRight" OverlayPositionTopLeft OverlayPosition = "topLeft" OverlayPositionBottomRight OverlayPosition = "bottomright" )
type WhitespaceOption ¶
type WhitespaceOption func(*whitespace)
WhitespaceOption sets a styling rule for rendering whitespace.
func WithWhitespaceChars ¶
func WithWhitespaceChars(s string) WhitespaceOption
WithWhitespaceChars sets the characters to be rendered in the whitespace.
Click to show internal directories.
Click to hide internal directories.