Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcHeight ¶ added in v1.0.0
CalcHeight calculates the image height from the number of lines of the source code, padding and access bar
Types ¶
type Formatter ¶ added in v0.4.0
type Formatter interface {
Format(w io.Writer, style *chroma.Style, iterator chroma.Iterator) error
}
Formatter implements Format()
type PNGFormatter ¶
type PNGFormatter struct {
// contains filtered or unexported fields
}
PNGFormatter is a formatter for PNG
func NewPNGFormatter ¶
NewPNGFormatter generates a new PNG formatter
type Panel ¶ added in v0.4.0
type Panel struct { Formatter Formatter // contains filtered or unexported fields }
Panel holds an image and formatter
func NewImage ¶ added in v1.0.0
func NewImage(src io.Reader, face font.Face, fontSize float64, style, backgroundColor string, noWindowAccessBar, noLineNum bool) (*Panel, error)
NewImage generates new base panel
Click to show internal directories.
Click to hide internal directories.