func (b Box) Shift(x, y int) Box {
	return Box{
		Top:    b.Top + y,
		Left:   b.Left + x,
		Right:  b.Right + x,
		Bottom: b.Bottom + y,
	}
}
Shift pushes a box by x,y.
package chart
import (
	"fmt"
	"math"
)
var (
	BoxZero = Box{IsSet: true}
)
func NewBox(top, left, right, bottom int) Box {
	return Box{
		IsSet:  true,
		Top:    top,
		Left:   left,
		Right:  right,
		Bottom: bottom,
	}
}
type Box struct {
	Top    int
	Left   int
	Right  int
	Bottom int
	IsSet  bool
}
func (b Box) IsZero() bool {
	if b.IsSet {
		return false
	}
	return b.Top == 0 && b.Left == 0 && b.Right == 0 && b.Bottom == 0
}
func (b Box) String() string {
	return fmt.Sprintf("box(%d,%d,%d,%d)", b.Top, b.Left, b.Right, b.Bottom)
}
func (b Box) GetTop(defaults ...int) int {
	if !b.IsSet && b.Top == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	return b.Top
}
func (b Box) GetLeft(defaults ...int) int {
	if !b.IsSet && b.Left == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	return b.Left
}
func (b Box) GetRight(defaults ...int) int {
	if !b.IsSet && b.Right == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	return b.Right
}
func (b Box) GetBottom(defaults ...int) int {
	if !b.IsSet && b.Bottom == 0 {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	return b.Bottom
}
func (b Box) Width() int {
	return AbsInt(b.Right - b.Left)
}
func (b Box) Height() int {
	return AbsInt(b.Bottom - b.Top)
}
func (b Box) Center() (x, y int) {
	w2, h2 := b.Width()>>1, b.Height()>>1
	return b.Left + w2, b.Top + h2
}
func (b Box) Aspect() float64 {
	return float64(b.Width()) / float64(b.Height())
}
func (b Box) Clone() Box {
	return Box{
		IsSet:  b.IsSet,
		Top:    b.Top,
		Left:   b.Left,
		Right:  b.Right,
		Bottom: b.Bottom,
	}
}
func (b Box) IsBiggerThan(other Box) bool {
	return b.Top < other.Top ||
		b.Bottom > other.Bottom ||
		b.Left < other.Left ||
		b.Right > other.Right
}
func (b Box) IsSmallerThan(other Box) bool {
	return b.Top > other.Top &&
		b.Bottom < other.Bottom &&
		b.Left > other.Left &&
		b.Right < other.Right
}
func (b Box) Equals(other Box) bool {
	return b.Top == other.Top &&
		b.Left == other.Left &&
		b.Right == other.Right &&
		b.Bottom == other.Bottom
}
func (b Box) Grow(other Box) Box {
	return Box{
		Top:    MinInt(b.Top, other.Top),
		Left:   MinInt(b.Left, other.Left),
		Right:  MaxInt(b.Right, other.Right),
		Bottom: MaxInt(b.Bottom, other.Bottom),
	}
}