rectangle

package
v0.0.0-...-e2c65c2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package rectangle provides functions for manipulating image points and rectangles, particularly applicable to terminal user interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture(r image.Rectangle, pt image.Point) image.Rectangle

Capture returns the rectangle expanded to enclose a point.

func Inset

func Inset(r image.Rectangle, x, y int) image.Rectangle

Inset shrinks

func MiddleCenter

func MiddleCenter(inner, outer image.Rectangle) image.Rectangle

MiddleCenter finds a rectangle of the size of the inner rectangle but transposed into the vertical and horizontal center of the outer rectangle.

func Outset

func Outset(r image.Rectangle, x, y int) image.Rectangle

Outset grows

func SplitHorizontal

func SplitHorizontal(r image.Rectangle) (upper, lower image.Rectangle)

SplitHorizontal divides a rectangle into two stacked halves.

func SplitVertical

func SplitVertical(r image.Rectangle) (upper, lower image.Rectangle)

SplitVertical divides a rectangle into two adjacent halves.

Types

This section is empty.

Jump to

Keyboard shortcuts

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