animation

package
v0.0.0-...-43e2d86 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawImage

func DrawImage(disp drivers.Displayer, offX, offY int16, img image.Image, wrap bool)

DrawImage draws the image on the display at the given coordinates. If wrap is true, off-screen coordinates will wrap around to the other side of the display. Otherwise, off-screen coordinates will be clipped.

Wrapping negative offsets may not work correctly.

Types

type Animation

type Animation interface {
	// Activate is called when the animation is being started on the display.
	// An animation may be re-used so this should be able to be called more than once.
	// Typically, this would be used to clear the display for an animation that does not cover the entire display,
	// so each frame only has to draw the changed areas.
	Activate(drivers.Displayer)
	// DrawFrame draws the next frame of the animation.
	// The current frame number is provided to allow animations to be keyed off every-x-frames without having to keep
	// track of that themselves.
	// Returns whether the animation should continue.
	DrawFrame(disp drivers.Displayer, tick uint32) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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