Versions in this module Expand all Collapse all v0 v0.8.0 Oct 10, 2018 v0.7.0 Feb 19, 2018 Changes in this version + func Clamp(x, min, max float64) float64 type Rect + func (r Rect) Area() float64 + func (r Rect) Intersect(s Rect) Rect type Vec + func Unit(angle float64) Vec + func (u Vec) Normal() Vec + func (u Vec) Project(v Vec) Vec + func (u Vec) To(v Vec) Vec v0.6.0 May 30, 2017 Changes in this version + var ZV = Vec type Rect + func (r Rect) Union(s Rect) Rect type Sprite + func (s *Sprite) DrawColorMask(t Target, matrix Matrix, mask color.Color) type Vec + func (u Vec) Add(v Vec) Vec + func (u Vec) Sub(v Vec) Vec v0.5.1 Apr 28, 2017 v0.5.0 Apr 24, 2017 Changes in this version + var IM = Matrix(mgl64.Ident3()) + var RGBAModel = color.ModelFunc(rgbaModel) + type BasicTarget interface + SetColorMask func(color.Color) + SetMatrix func(Matrix) + type Batch struct + func NewBatch(container Triangles, pic Picture) *Batch + func (b *Batch) Clear() + func (b *Batch) Dirty() + func (b *Batch) Draw(t Target) + func (b *Batch) MakePicture(p Picture) TargetPicture + func (b *Batch) MakeTriangles(t Triangles) TargetTriangles + func (b *Batch) SetColorMask(c color.Color) + func (b *Batch) SetMatrix(m Matrix) + type ComposeMethod int + const ComposeAtop + const ComposeCopy + const ComposeIn + const ComposeOut + const ComposeOver + const ComposePlus + const ComposeRatop + const ComposeRin + const ComposeRout + const ComposeRover + const ComposeXor + func (cm ComposeMethod) Compose(a, b RGBA) RGBA + type ComposeTarget interface + SetComposeMethod func(ComposeMethod) + type Drawer struct + Picture Picture + Triangles Triangles + func (d *Drawer) Dirty() + func (d *Drawer) Draw(t Target) + type Matrix [9]float64 + func (m Matrix) Chained(next Matrix) Matrix + func (m Matrix) Moved(delta Vec) Matrix + func (m Matrix) Project(u Vec) Vec + func (m Matrix) Rotated(around Vec, angle float64) Matrix + func (m Matrix) Scaled(around Vec, scale float64) Matrix + func (m Matrix) ScaledXY(around Vec, scale Vec) Matrix + func (m Matrix) String() string + func (m Matrix) Unproject(u Vec) Vec + type Picture interface + Bounds func() Rect + type PictureColor interface + Color func(at Vec) RGBA + type PictureData struct + Pix []color.RGBA + Rect Rect + Stride int + func MakePictureData(rect Rect) *PictureData + func PictureDataFromImage(img image.Image) *PictureData + func PictureDataFromPicture(pic Picture) *PictureData + func (pd *PictureData) Bounds() Rect + func (pd *PictureData) Color(at Vec) RGBA + func (pd *PictureData) Image() *image.RGBA + func (pd *PictureData) Index(at Vec) int + func (pd *PictureData) SetColor(at Vec, col color.Color) + type RGBA struct + A float64 + B float64 + G float64 + R float64 + func Alpha(a float64) RGBA + func RGB(r, g, b float64) RGBA + func ToRGBA(c color.Color) RGBA + func (c RGBA) Add(d RGBA) RGBA + func (c RGBA) Mul(d RGBA) RGBA + func (c RGBA) RGBA() (r, g, b, a uint32) + func (c RGBA) Scaled(scale float64) RGBA + func (c RGBA) Sub(d RGBA) RGBA + type Rect struct + Max Vec + Min Vec + func R(minX, minY, maxX, maxY float64) Rect + func (r Rect) Center() Vec + func (r Rect) Contains(u Vec) bool + func (r Rect) H() float64 + func (r Rect) Moved(delta Vec) Rect + func (r Rect) Norm() Rect + func (r Rect) Resized(anchor, size Vec) Rect + func (r Rect) ResizedMin(size Vec) Rect + func (r Rect) Size() Vec + func (r Rect) String() string + func (r Rect) W() float64 + func (r Rect) WithMax(max Vec) Rect + func (r Rect) WithMin(min Vec) Rect + type Sprite struct + func NewSprite(pic Picture, frame Rect) *Sprite + func (s *Sprite) ColorMask() RGBA + func (s *Sprite) Draw(t Target) + func (s *Sprite) Frame() Rect + func (s *Sprite) Matrix() Matrix + func (s *Sprite) Picture() Picture + func (s *Sprite) Set(pic Picture, frame Rect) + func (s *Sprite) SetColorMask(mask color.Color) + func (s *Sprite) SetMatrix(matrix Matrix) + type Target interface + MakePicture func(Picture) TargetPicture + MakeTriangles func(Triangles) TargetTriangles + type TargetPicture interface + Draw func(TargetTriangles) + type TargetTriangles interface + Draw func() + type Triangles interface + Copy func() Triangles + Len func() int + SetLen func(len int) + Slice func(i, j int) Triangles + Update func(Triangles) + type TrianglesColor interface + Color func(i int) RGBA + type TrianglesData []struct + func MakeTrianglesData(len int) *TrianglesData + func (td *TrianglesData) Color(i int) RGBA + func (td *TrianglesData) Copy() Triangles + func (td *TrianglesData) Len() int + func (td *TrianglesData) Picture(i int) (pic Vec, intensity float64) + func (td *TrianglesData) Position(i int) Vec + func (td *TrianglesData) SetLen(len int) + func (td *TrianglesData) Slice(i, j int) Triangles + func (td *TrianglesData) Update(t Triangles) + type TrianglesPicture interface + Picture func(i int) (pic Vec, intensity float64) + type TrianglesPosition interface + Position func(i int) Vec + type Vec complex128 + func Lerp(a, b Vec, t float64) Vec + func V(x, y float64) Vec + func X(x float64) Vec + func Y(y float64) Vec + func (u Vec) Angle() float64 + func (u Vec) Cross(v Vec) float64 + func (u Vec) Dot(v Vec) float64 + func (u Vec) Len() float64 + func (u Vec) Map(f func(float64) float64) Vec + func (u Vec) Rotated(angle float64) Vec + func (u Vec) Scaled(c float64) Vec + func (u Vec) ScaledXY(v Vec) Vec + func (u Vec) String() string + func (u Vec) Unit() Vec + func (u Vec) WithX(x float64) Vec + func (u Vec) WithY(y float64) Vec + func (u Vec) X() float64 + func (u Vec) XY() (x, y float64) + func (u Vec) Y() float64