Versions in this module Expand all Collapse all v2 v2.1.0 Nov 2, 2023 Changes in this version + const AxisLeftTrigger + const AxisLeftX + const AxisLeftY + const AxisRightTrigger + const AxisRightX + const AxisRightY + const GamepadA + const GamepadB + const GamepadBack + const GamepadCircle + const GamepadCross + const GamepadDpadDown + const GamepadDpadLeft + const GamepadDpadRight + const GamepadDpadUp + const GamepadGuide + const GamepadLeftBumper + const GamepadLeftThumb + const GamepadRightBumper + const GamepadRightThumb + const GamepadSquare + const GamepadStart + const GamepadTriangle + const GamepadX + const GamepadY + const Joystick1 + const Joystick10 + const Joystick11 + const Joystick12 + const Joystick13 + const Joystick14 + const Joystick15 + const Joystick16 + const Joystick2 + const Joystick3 + const Joystick4 + const Joystick5 + const Joystick6 + const Joystick7 + const Joystick8 + const Joystick9 + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyApostrophe + const KeyB + const KeyBackslash + const KeyBackspace + const KeyC + const KeyCapsLock + const KeyComma + const KeyD + const KeyDelete + const KeyDown + const KeyE + const KeyEnd + const KeyEnter + const KeyEqual + const KeyEscape + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF25 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyG + const KeyGraveAccent + const KeyH + const KeyHome + const KeyI + const KeyInsert + const KeyJ + const KeyK + const KeyKP0 + const KeyKP1 + const KeyKP2 + const KeyKP3 + const KeyKP4 + const KeyKP5 + const KeyKP6 + const KeyKP7 + const KeyKP8 + const KeyKP9 + const KeyKPAdd + const KeyKPDecimal + const KeyKPDivide + const KeyKPEnter + const KeyKPEqual + const KeyKPMultiply + const KeyKPSubtract + const KeyL + const KeyLeft + const KeyLeftAlt + const KeyLeftBracket + const KeyLeftControl + const KeyLeftShift + const KeyLeftSuper + const KeyM + const KeyMenu + const KeyMinus + const KeyN + const KeyNumLock + const KeyO + const KeyP + const KeyPageDown + const KeyPageUp + const KeyPause + const KeyPeriod + const KeyPrintScreen + const KeyQ + const KeyR + const KeyRight + const KeyRightAlt + const KeyRightBracket + const KeyRightControl + const KeyRightShift + const KeyRightSuper + const KeyS + const KeyScrollLock + const KeySemicolon + const KeySlash + const KeySpace + const KeyT + const KeyTab + const KeyU + const KeyUp + const KeyV + const KeyW + const KeyWorld1 + const KeyWorld2 + const KeyX + const KeyY + const KeyZ + const MouseButton1 + const MouseButton2 + const MouseButton3 + const MouseButton4 + const MouseButton5 + const MouseButton6 + const MouseButton7 + const MouseButton8 + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + const NumAxes + const NumButtons + const NumGamepadButtons + const NumJoysticks + type Action int + const Press + const Release + const Repeat + const UnknownAction + func (a Action) String() string + type Button int + const UnknownButton + func (b Button) String() string + type GamepadAxis int + const UnknownGamepadAxis + func (ga GamepadAxis) String() string + type GamepadButton int + const UnknownGampadButton + func (gb GamepadButton) String() string + type InputHandler struct + func (ih *InputHandler) ButtonEvent(button Button, action Action) + func (ih *InputHandler) CharEvent(r rune) + func (ih *InputHandler) JustPressed(button Button) bool + func (ih *InputHandler) JustReleased(button Button) bool + func (ih *InputHandler) MouseEnteredEvent(entered bool) + func (ih *InputHandler) MouseInsideWindow() bool + func (ih *InputHandler) MouseMoveEvent(pos Vec) + func (ih *InputHandler) MousePosition() Vec + func (ih *InputHandler) MousePreviousPosition() Vec + func (ih *InputHandler) MousePreviousScroll() Vec + func (ih *InputHandler) MouseScroll() Vec + func (ih *InputHandler) MouseScrollEvent(x, y float64) + func (ih *InputHandler) Pressed(button Button) bool + func (ih *InputHandler) Repeated(button Button) bool + func (ih *InputHandler) SetMousePosition(pos Vec) + func (ih *InputHandler) Typed() string + func (ih *InputHandler) Update() + type Joystick int + const UnknownJoystick + func (j Joystick) String() string v2.0.1 Oct 11, 2023 v2.0.0 Oct 11, 2023 Changes in this version + var Bottom = Anchor + var BottomLeft = Anchor + var BottomRight = Anchor + var Center = Anchor + var IM = Matrix + var Left = Anchor + var RGBAModel = color.ModelFunc(rgbaModel) + var Right = Anchor + var Top = Anchor + var TopLeft = Anchor + var TopRight = Anchor + var ZB = Constant(V(1, 0)) + var ZR = Rect + var ZV = Vec + func Clamp(x, min, max float64) float64 + type Anchor Vec + func (anchor Anchor) Opposite() Anchor + func (anchor Anchor) String() string + 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 Bezier struct + End Vec + EndHandle Vec + Start Vec + StartHandle Vec + func B(start, startHandle, endHandle, end Vec) Bezier + func Constant(constant Vec) Bezier + func Linear(start, end Vec) Bezier + func (b Bezier) Point(t float64) Vec + type Circle struct + Center Vec + Radius float64 + func C(center Vec, radius float64) Circle + func (c Circle) Area() float64 + func (c Circle) Bounds() Rect + func (c Circle) Contains(u Vec) bool + func (c Circle) Formula() (h, k float64) + func (c Circle) Intersect(d Circle) Circle + func (c Circle) IntersectLine(l Line) Vec + func (c Circle) IntersectRect(r Rect) Vec + func (c Circle) IntersectionPoints(l Line) []Vec + func (c Circle) Moved(delta Vec) Circle + func (c Circle) Norm() Circle + func (c Circle) Resized(radiusDelta float64) Circle + func (c Circle) String() string + func (c Circle) Union(d Circle) Circle + 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 + Cached bool + Picture Picture + Triangles Triangles + func (d *Drawer) Dirty() + func (d *Drawer) Draw(t Target) + type Line struct + A Vec + B Vec + func L(from, to Vec) Line + func (l Line) Bounds() Rect + func (l Line) Center() Vec + func (l Line) Closest(v Vec) Vec + func (l Line) Contains(v Vec) bool + func (l Line) Formula() (m, b float64) + func (l Line) Intersect(k Line) (Vec, bool) + func (l Line) IntersectCircle(c Circle) Vec + func (l Line) IntersectRect(r Rect) Vec + func (l Line) Len() float64 + func (l Line) Moved(delta Vec) Line + func (l Line) Rotated(around Vec, angle float64) Line + func (l Line) Scaled(scale float64) Line + func (l Line) ScaledXY(around Vec, scale float64) Line + func (l Line) String() string + type Matrix [6]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) AnchorPos(anchor Anchor) Vec + func (r Rect) Area() float64 + func (r Rect) Bounds() Rect + func (r Rect) Center() Vec + func (r Rect) Contains(u Vec) bool + func (r Rect) Edges() [4]Line + func (r Rect) H() float64 + func (r Rect) Intersect(s Rect) Rect + func (r Rect) IntersectCircle(c Circle) Vec + func (r Rect) IntersectLine(l Line) Vec + func (r Rect) IntersectionPoints(l Line) []Vec + func (r Rect) Intersects(s Rect) bool + 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) Union(s Rect) Rect + func (r Rect) Vertices() [4]Vec + func (r Rect) W() float64 + func (rect Rect) AlignedTo(anchor Anchor) Rect + type Sprite struct + func NewSprite(pic Picture, frame Rect) *Sprite + func (s *Sprite) Draw(t Target, matrix Matrix) + func (s *Sprite) DrawColorMask(t Target, matrix Matrix, mask color.Color) + func (s *Sprite) Frame() Rect + func (s *Sprite) Picture() Picture + func (s *Sprite) Set(pic Picture, frame Rect) + func (s *Sprite) SetCached(cached bool) + 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 TrianglesClipped interface + ClipRect func(i int) (rect Rect, is bool) + type TrianglesColor interface + Color func(i int) RGBA + type TrianglesData []struct + func MakeTrianglesData(len int) *TrianglesData + func (td *TrianglesData) ClipRect(i int) (rect Rect, has bool) + 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 struct + X float64 + Y float64 + func Lerp(a, b Vec, t float64) Vec + func Unit(angle float64) Vec + func V(x, y float64) Vec + func (u Vec) Add(v Vec) Vec + func (u Vec) Angle() float64 + func (u Vec) Cross(v Vec) float64 + func (u Vec) Dot(v Vec) float64 + func (u Vec) Eq(v Vec) bool + func (u Vec) Floor() Vec + func (u Vec) Len() float64 + func (u Vec) Map(f func(float64) float64) Vec + func (u Vec) Normal() Vec + func (u Vec) Project(v Vec) 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) SqLen() float64 + func (u Vec) String() string + func (u Vec) Sub(v Vec) Vec + func (u Vec) To(v Vec) Vec + func (u Vec) Unit() Vec + func (u Vec) XY() (x, y float64) Other modules containing this package github.com/gopxl/pixel