rect

package
v0.0.0-...-c728fae Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AverageSize

func AverageSize(rect image.Rectangle) int

AverageSize gets the average of the height and width of the rectangle

func CenterColor

func CenterColor(tmpImg image.Image) (color.Color, error)

CenterColor gets the color of the pixel in the middle of an image

func DrawObject

func DrawObject(img *image.RGBA, color color.Color, obj object.Object)

DrawObject is a wrapper for the DrawRectangle function for objects

func DrawRectangle

func DrawRectangle(img *image.RGBA, color color.Color, rect image.Rectangle)

DrawRectangle draws a rectangle using the specified color onto an image

func GetRectangle

func GetRectangle(points []image.Point) image.Rectangle

GetRectangle creates a rectangle around a cluster of points

func HLine

func HLine(img *image.RGBA, col color.Color, x1, y, x2 int)

HLine draws a horizontal line

func Rect

func Rect(img *image.RGBA, col color.Color, x1, y1, x2, y2 int)

Rect draws a rectangle utilizing HLine() and VLine()

func RectangleCenter

func RectangleCenter(rect image.Rectangle) (point image.Point)

RectangleCenter finds the point in the middle of a rectangle

func VLine

func VLine(img *image.RGBA, col color.Color, x, y1, y2 int)

VLine draws a vertical line

Types

This section is empty.

Jump to

Keyboard shortcuts

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