key

package
v0.0.0-...-d30abd5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

package key

import "github.com/zeebo/rothko/draw/key"

package key provides a way to draw a heatmap key

Usage

func Draw
func Draw(canvas *draw.RGB, opts Options) (out *draw.RGB)

Draw draws a key using values from Options on to the provided canvas, allocating an output canvas if the input is not large enough.

type Options
type Options struct {
	// Colors is the slice of colors to map the column data on to.
	Colors []draw.Color

	// Height is how tall the key will be.
	Height int

	// Width is how wide the key will be.
	Width int
}

Options are the things you can specify to control the rendering of a key.

Documentation

Overview

package key provides a way to draw a heatmap key

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draw

func Draw(canvas *draw.RGB, opts Options) (out *draw.RGB)

Draw draws a key using values from Options on to the provided canvas, allocating an output canvas if the input is not large enough.

Types

type Options

type Options struct {
	// Colors is the slice of colors to map the column data on to.
	Colors []draw.Color

	// Height is how tall the key will be.
	Height int

	// Width is how wide the key will be.
	Width int
}

Options are the things you can specify to control the rendering of a key.

Jump to

Keyboard shortcuts

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