minimap

package module
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: BSD-3-Clause Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

minimap

Go package for creating a minimap of a file, using text.

  • Version: 1.3.3
  • License: BSD-3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block added in v1.1.0

func Block(contents string, targetLineLength, targetOutputLines int) string

Block creates a minimap of the given text, using block characters

func ColorMinimap added in v1.1.0

func ColorMinimap(data string, width, height int, m mode.Mode, highlightIndex int) (string, error)

ColorMinimap returns a colored text representation of the given text. width and height are the number of characters and lines for the minimap. highlightIndex is the line index to be highlighted in the minimap. Use -1 for no highlight.

func DrawBackgroundMinimap added in v1.2.0

func DrawBackgroundMinimap(c *vt100.Canvas, data string, x, y, width, height int, highlightIndex int, contentColor, spaceColor, highlightColor vt100.AttributeColor) error

DrawBackgroundMinimap draws a colored representation of the given text onto a vt100.Canvas.

func DrawBackgroundMinimapHighlight added in v1.3.3

func DrawBackgroundMinimapHighlight(c *vt100.Canvas, data string, x, y, width, height int, highlightIndex int, highlightColor vt100.AttributeColor) error

DrawBackgroundMinimapHighlight draws just the highlighted line of the minimap

func Simple

func Simple(contents string, targetLineLength, targetOutputLines int) string

Simple function creates a basic minimap of the contents.

Types

This section is empty.

Directories

Path Synopsis
cmd
bgcanvas command
bghighlight command
block command
color command
simple command

Jump to

Keyboard shortcuts

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