minimap

package module
v1.3.0 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: 1

README

minimap

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

  • Version: 1.3.0
  • 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 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

Jump to

Keyboard shortcuts

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