Documentation ¶
Overview ¶
Package f32 is a float32 implementation of package image's Point and Rectangle.
The coordinate space has the origin in the top left corner with the axes extending right and down.
Index ¶
- 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) Size() Point
- func (r Rectangle) Sub(p Point) Rectangle
- func (r Rectangle) Union(s Rectangle) Rectangle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 (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.