package f32
import "gioui.org/internal/f32"
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 FRect(r image.Rectangle) Rectangle
- func Rect(x0, y0, x1, y1 float32) 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
Variables ¶
var NewAffine2D = f32.NewAffine2D
Pt is shorthand for Point{X: x, Y: y}.
Types ¶
type Affine2D ¶
type Point ¶
func FPt ¶
Fpt converts an point to a f32.Point.
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 FRect ¶
fRect converts a rectangle to a f32internal.Rectangle.
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) Add ¶
Add offsets r with the vector p.
func (Rectangle) Canon ¶
Canon returns the canonical version of r, where Min is to the upper left of Max.
func (Rectangle) Dx ¶
Dx returns r's width.
func (Rectangle) Dy ¶
Dy returns r's Height.
func (Rectangle) Empty ¶
Empty reports whether r represents the empty area.
func (Rectangle) Intersect ¶
Intersect returns the intersection of r and s.
func (Rectangle) Round ¶
Round returns the smallest integer rectangle that contains r.
func (Rectangle) Size ¶
Size returns r's width and height.
func (Rectangle) String ¶
String return a string representation of r.
func (Rectangle) Sub ¶
Sub offsets r with the vector -p.
func (Rectangle) Union ¶
Union returns the union of r and s.
Source Files ¶
f32.go
- Version
- v0.8.0 (latest)
- Published
- Jan 14, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 5 hours ago –
Tools for package owners.