geom.go

 1package cellbuf
 2
 3import (
 4	"image"
 5)
 6
 7// Position represents an x, y position.
 8type Position = image.Point
 9
10// Pos is a shorthand for Position{X: x, Y: y}.
11func Pos(x, y int) Position {
12	return image.Pt(x, y)
13}
14
15// Rectange represents a rectangle.
16type Rectangle = image.Rectangle
17
18// Rect is a shorthand for Rectangle.
19func Rect(x, y, w, h int) Rectangle {
20	return image.Rect(x, y, x+w, y+h)
21}