Documentation ¶
Overview ¶
Package g provides graphics helpers.
Index ¶
- Variables
- func Abs(v float32) float32
- func Circle(ops *op.Ops, at f32.Point, r float32) clip.PathSpec
- func Clamp(p, min, max float32) float32
- func Cos(v float32) float32
- func Dot(a, b f32.Point) float32
- func FillCircle(ops *op.Ops, at f32.Point, r float32) clip.Op
- func FillRect(ops *op.Ops, x, y, w, h float32) clip.Op
- func FillText(th *material.Theme, gtx layout.Context, s string, at f32.Point)
- func HSL(h, s, l float32) color.NRGBA
- func HSLA(h, s, l, a float32) color.NRGBA
- func HexRGB(v uint32) color.NRGBA
- func HexRGB1(v uint16) color.NRGBA
- func HexRGBA(v uint32) color.NRGBA
- func HexRGBA1(v uint16) color.NRGBA
- func Len(p f32.Point) float32
- func Lerp(p, min, max float32) float32
- func LerpClamp(p, min, max float32) float32
- func Map(v, min, max, toMin, toMax float32) float32
- func Mod(x, y float32) float32
- func Normal(a f32.Point) f32.Point
- func PtLerp(p float32, a, b f32.Point) f32.Point
- func PtLerpClamp(p float32, a, b f32.Point) f32.Point
- func RGB(r, g, b float32) color.NRGBA
- func RGBA(r, g, b, a float32) color.NRGBA
- func RGBAFloat(c color.NRGBA) (r, g, b, a float32)
- func RGBALerp(a, b color.NRGBA, p float32) color.NRGBA
- func Rand() float32
- func RandPt() f32.Point
- func RandRange(min, max float32) float32
- func RandUnitPt() f32.Point
- func Rect(ops *op.Ops, x, y, w, h float32) clip.PathSpec
- func Round(v float32) float32
- func Sat8(v float32) uint8
- func Sign(v float32) float32
- func Sin(v float32) float32
- func Sincos(v float32) (sn, cs float32)
- func Sqrt(v float32) float32
- func Unit(p f32.Point) f32.Point
- type Log
- type Offset
Constants ¶
This section is empty.
Variables ¶
View Source
var ( White = color.NRGBA{0xFF, 0xFF, 0xFF, 0xFF} Black = color.NRGBA{0x00, 0x00, 0x00, 0xFF} Red = color.NRGBA{0xFF, 0x00, 0x00, 0xFF} Green = color.NRGBA{0x00, 0xFF, 0x00, 0xFF} Blue = color.NRGBA{0x00, 0x00, 0xFF, 0xFF} Yellow = color.NRGBA{0xFF, 0xFF, 0x00, 0xFF} Transparent = color.NRGBA{0xFF, 0xFF, 0xFF, 0x00} )
Functions ¶
func RandUnitPt ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.