layout

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	X float64
	Y float64
	W float64
	H float64
}
var NilBox Box = Box{}

func Squarify

func Squarify(box Box, areas []float64) []Box

Squarify partitions box into parts by using Squarify algorithm. As described in "Squarified Treemaps", Mark Bruls, Kees Huizing, and Jarke J. van Wijk., 2000 This function does sanity checks and hardening so that algorithm can work in the wild. Returns boxes in same order as areas. Zero areas will have zero-value box.

Jump to

Keyboard shortcuts

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