gfx

package
v0.0.0-...-ff41cbe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawCursor

func DrawCursor(screen *ebiten.Image)

func DrawText

func DrawText(screen *ebiten.Image, str string, position Vector2, face font.Face, col color.Color, shadow bool)

Types

type Animation

type Animation struct {
	Sheet         *ebiten.Image
	TotalFrames   int
	IntervalTicks int
	OnFinish      func()
	// contains filtered or unexported fields
}

func NewAnimation

func NewAnimation(sheet *ebiten.Image, totalFrames int, intervalTicks int, size int) *Animation

func (*Animation) Reset

func (a *Animation) Reset()

func (*Animation) Update

func (a *Animation) Update() *ebiten.Image

type Colorshift

type Colorshift struct {
	R, G, B, A float64
}

func NewColorshift

func NewColorshift(r, g, b, a float64) Colorshift

type Transform

type Transform struct {
	// contains filtered or unexported fields
}

func NewTransform

func NewTransform() Transform

func (*Transform) Calculate

func (t *Transform) Calculate() ebiten.GeoM

func (*Transform) Identity

func (t *Transform) Identity()

func (*Transform) IdentityWithPosition

func (t *Transform) IdentityWithPosition(position Vector2)

func (*Transform) Origin

func (t *Transform) Origin() Vector2

func (*Transform) Position

func (t *Transform) Position() Vector2

func (*Transform) Rotation

func (t *Transform) Rotation() float64

func (*Transform) Scale

func (t *Transform) Scale() Vector2

func (*Transform) SetOrigin

func (t *Transform) SetOrigin(origin Vector2)

func (*Transform) SetPosition

func (t *Transform) SetPosition(position Vector2)

func (*Transform) SetRotation

func (t *Transform) SetRotation(rotation float64)

func (*Transform) SetScale

func (t *Transform) SetScale(scale Vector2)

func (*Transform) SetSkew

func (t *Transform) SetSkew(skew Vector2)

func (*Transform) Skew

func (t *Transform) Skew() Vector2

type Vector2

type Vector2 struct {
	X, Y float64
}

func V

func V[T int | float64](x, y T) Vector2

func VFromRadians

func VFromRadians(radians float64) Vector2

func VZero

func VZero() Vector2

func (Vector2) Add

func (v Vector2) Add(right Vector2) Vector2

func (Vector2) AddF

func (v Vector2) AddF(right float64) Vector2

func (Vector2) Distance

func (v Vector2) Distance(to Vector2) float64

func (Vector2) DistanceSquared

func (v Vector2) DistanceSquared(to Vector2) float64

func (Vector2) Dot

func (v Vector2) Dot(right Vector2) float64

func (Vector2) Equals

func (v Vector2) Equals(right Vector2) bool

func (Vector2) Invert

func (v Vector2) Invert() Vector2

func (Vector2) IsNonZero

func (v Vector2) IsNonZero() bool

func (Vector2) IsZero

func (v Vector2) IsZero() bool

func (Vector2) Length

func (v Vector2) Length() float64

func (Vector2) Multiply

func (v Vector2) Multiply(right Vector2) Vector2

func (Vector2) MultiplyF

func (v Vector2) MultiplyF(right float64) Vector2

func (Vector2) Normalized

func (v Vector2) Normalized() Vector2

func (Vector2) Orthogonal

func (v Vector2) Orthogonal() Vector2

func (Vector2) Subtract

func (v Vector2) Subtract(right Vector2) Vector2

func (Vector2) Unwrap

func (v Vector2) Unwrap() (float64, float64)

func (Vector2) UnwrapInt

func (v Vector2) UnwrapInt() (int, int)

func (Vector2) VToRadians

func (v Vector2) VToRadians() float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL