Documentation ¶
Overview ¶
Package graphics provides functionality for 2D graphics rendering, including textures, sprites, text, and shapes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventManager ¶
type EventManager interface {
PollEvents() bool
}
type GraphicsBackend ¶
type GraphicsBackend interface { Close() GetScreenSize() (int, int) SetScreenSize(width int, height int) WindowManager EventManager Renderer TextureManager ShapeRenderer InputManager }
type InputManager ¶
type Renderable ¶
type Renderable interface { RenderPass(pass *wgpu.RenderPassEncoder) Render() Dispose() IsDisposed() bool Hide() }
type Shape ¶
type Shape interface { Renderable Transformable SetColor(c color.Color) }
type ShapeRenderer ¶
type ShapeRenderer interface { AddPolygon(cx, cy int, width float32, c color.Color, sides int) Shape AddTriangle(x1, y1, x2, y2, x3, y3 int, c color.Color) Shape AddRectangle(x, y, width, height int, c color.Color) Shape AddCircle(cx, cy int, radius float32, c color.Color, segments int) Shape AddLine(x1, y1, x2, y2 int, width float32, c color.Color) Shape }
type Texture ¶
type Texture interface { Handle() uintptr UpdateImage(img image.Image) error SetShouldBeRendered(souldRender bool) Resize(width, height float32) Move(x, y float32) Rotate(a, pivotX, pivotY float32) Scale(x, y float32) FlipVertical() FlipHorizontal() Clip(minX, minY, maxX, maxY float32) RenderPass(pass *wgpu.RenderPassEncoder) Render() Dispose() IsDisposed() bool }
type TextureManager ¶
type Transformable ¶
Directories ¶
Path | Synopsis |
---|---|
internal/surface
The surface package provides a virtual screen to render things to.
|
The surface package provides a virtual screen to render things to. |
Click to show internal directories.
Click to hide internal directories.