Documentation ¶
Overview ¶
Package f32 is an internal version of the public package f32 with extra types for internal use.
Index ¶
- Variables
- type Affine2D
- type Point
- type Rectangle
- func (r Rectangle) Add(p Point) Rectangle
- func (r Rectangle) Canon() Rectangle
- func (r Rectangle) Dx() float32
- func (r Rectangle) Dy() float32
- func (r Rectangle) Empty() bool
- func (r Rectangle) Intersect(s Rectangle) Rectangle
- func (r Rectangle) Round() image.Rectangle
- func (r Rectangle) Size() Point
- func (r Rectangle) String() string
- func (r Rectangle) Sub(p Point) Rectangle
- func (r Rectangle) Union(s Rectangle) Rectangle
Constants ¶
This section is empty.
Variables ¶
View Source
var NewAffine2D = f32.NewAffine2D
View Source
var Pt = f32.Pt
Pt is shorthand for Point{X: x, Y: y}.
Functions ¶
This section is empty.
Types ¶
type Rectangle ¶
type Rectangle struct {
Min, Max Point
}
A Rectangle contains the points (X, Y) where Min.X <= X < Max.X, Min.Y <= Y < Max.Y.
func Rect ¶
Rect is a shorthand for Rectangle{Point{x0, y0}, Point{x1, y1}}. The returned Rectangle has x0 and y0 swapped if necessary so that it's correctly formed.
func (Rectangle) Canon ¶
Canon returns the canonical version of r, where Min is to the upper left of Max.
Click to show internal directories.
Click to hide internal directories.