Versions in this module Expand all Collapse all v0 v0.5.1 Apr 28, 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 + 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