impl

package
v0.0.0-...-a545287 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeartWidth  = 13
	HeartHeight = 12
)
View Source
const (
	HeartRedWidth  = 13
	HeartRedHeight = 12
)
View Source
const BAR_SPACING = 0
View Source
const BAR_WIDTH = 4
View Source
const MAX_HEIGHT = 64

Variables

This section is empty.

Functions

func NbFrequencies

func NbFrequencies() int

func NewClock

func NewClock(canvas Canvas, center Point, radius int) Component

func NewDsp

func NewDsp(c Canvas) Component

func TotalDspWidth

func TotalDspWidth() int

Types

type BeanNDot

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

func NewBeanNDot

func NewBeanNDot(c Canvas) *BeanNDot

func (*BeanNDot) Draw

func (b *BeanNDot) Draw(canvas Canvas) error

func (*BeanNDot) Update

func (b *BeanNDot) Update(elapsedBetweenUpdate time.Duration) bool

type BouncingDot

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

func NewBouncingDot

func NewBouncingDot(c Canvas, initialPosition Point, initialVelocity FloatingPoint, initialBottomAcceleration float64, bounds image.Rectangle) *BouncingDot

func (*BouncingDot) Draw

func (m *BouncingDot) Draw(c Canvas) error

func (*BouncingDot) Update

func (m *BouncingDot) Update(elapsedBetweenUpdate time.Duration) bool

type Clock

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

func (*Clock) Draw

func (c *Clock) Draw(canvas Canvas) error

func (*Clock) Update

func (c *Clock) Update(elapsedBetweenUpdate time.Duration) bool

type Dsp

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

func (*Dsp) Draw

func (dsp *Dsp) Draw(canvas Canvas) error

func (*Dsp) Update

func (dsp *Dsp) Update(elapsedBetweenUpdate time.Duration) bool

type FadingDot

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

func NewFadingDot

func NewFadingDot(parent *Graphic, position Point, fadeDuration time.Duration, initialFade float64, initialFadeOut bool, xColor color.Color) *FadingDot

func (FadingDot) Draw

func (h FadingDot) Draw(canvas Canvas) error

func (*FadingDot) IsFaded

func (h *FadingDot) IsFaded() bool

func (*FadingDot) Update

func (h *FadingDot) Update(elapsedBetweenUpdate time.Duration) bool

type FadingDots

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

func NewFadingDots

func NewFadingDots(canvas Canvas, origin Point, nbFadingDots int, optColor color.Color) *FadingDots

func (*FadingDots) Draw

func (h *FadingDots) Draw(canvas Canvas) error

func (*FadingDots) Update

func (h *FadingDots) Update(elapsedBetweenUpdate time.Duration) bool

type FadingLine

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

func NewFadingLine

func NewFadingLine(canvas Canvas, parent *Graphic, position Point, length int, fullLightLength int, fadeDuration time.Duration, initialFade float64, initialFadeOut bool, xColor color.Color) *FadingLine

func (FadingLine) Draw

func (h FadingLine) Draw(canvas Canvas) error

func (*FadingLine) IsFaded

func (h *FadingLine) IsFaded() bool

func (*FadingLine) Update

func (h *FadingLine) Update(elapsedBetweenUpdate time.Duration) bool

type FadingLines

type FadingLines struct {
	// contains filtered or unexported fields
}
func (h *FadingLine) GetPosition() Point {
	return h.line.Graphic.ComputedOffset()
}
func (h *FadingLine) SetPosition(point Point) {
	h.line.Graphic.SetOffset(point)
}

func NewFadingLines

func NewFadingLines(canvas Canvas, origin Point, nbFadingLines int) *FadingLines

func (*FadingLines) Draw

func (h *FadingLines) Draw(canvas Canvas) error

func (*FadingLines) Update

func (h *FadingLines) Update(elapsedBetweenUpdate time.Duration) bool

type HappyBirthday

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

func NewHappyBirthday

func NewHappyBirthday(canvas Canvas) *HappyBirthday

func (*HappyBirthday) Draw

func (c *HappyBirthday) Draw(canvas Canvas) error

func (*HappyBirthday) Update

func (c *HappyBirthday) Update(elapsedBetweenUpdate time.Duration) bool

type Heart

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

func NewHeart

func NewHeart(canvas Canvas, parent *Graphic, initialPosition Point, fadeDuration time.Duration, initialFade float64, initialFadeOut bool) *Heart

func (Heart) Draw

func (h Heart) Draw(canvas Canvas) error

func (*Heart) GetPosition

func (h *Heart) GetPosition() Point

func (*Heart) IsFaded

func (h *Heart) IsFaded() bool

func (*Heart) SetPosition

func (h *Heart) SetPosition(point Point)

func (*Heart) Update

func (h *Heart) Update(elapsedBetweenUpdate time.Duration) bool

type HeartRed

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

func NewHeartRed

func NewHeartRed(canvas Canvas, parent *Graphic, initialPosition Point, fadeDuration time.Duration, initialFade float64, initialFadeOut bool) *HeartRed

func (HeartRed) Draw

func (h HeartRed) Draw(canvas Canvas) error

func (*HeartRed) GetPosition

func (h *HeartRed) GetPosition() Point

func (*HeartRed) IsFaded

func (h *HeartRed) IsFaded() bool

func (*HeartRed) SetPosition

func (h *HeartRed) SetPosition(point Point)

func (*HeartRed) Update

func (h *HeartRed) Update(elapsedBetweenUpdate time.Duration) bool

type Hearts

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

func NewHearts

func NewHearts(canvas Canvas, origin Point, nbHearts int) *Hearts

func (*Hearts) Draw

func (h *Hearts) Draw(canvas Canvas) error

func (*Hearts) Update

func (h *Hearts) Update(elapsedBetweenUpdate time.Duration) bool

type Images

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

func NewImages

func NewImages(imgPath string, position Point, targetSize Point) *Images

func (*Images) Draw

func (i *Images) Draw(canvas Canvas) error

func (*Images) Update

func (i *Images) Update(elapsedBetweenUpdate time.Duration) bool

type Info

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

func NewInfo

func NewInfo(c Canvas, enabled bool) *Info

func (*Info) Draw

func (i *Info) Draw(canvas Canvas) error

func (*Info) Update

func (i *Info) Update(elapsedBetweenUpdate time.Duration) bool

type MovingDot

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

func NewMovingDot

func NewMovingDot(c Canvas, initialPosition Point, initialVelocity FloatingPoint, bounds image.Rectangle) *MovingDot

func (*MovingDot) Draw

func (m *MovingDot) Draw(c Canvas) error

func (*MovingDot) Update

func (m *MovingDot) Update(elapsedBetweenUpdate time.Duration) bool

type MovingHeart

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

func NewMovingHeart

func NewMovingHeart(canvas Canvas, initialPosition Point, fadeDuration time.Duration, initialFade float64, initialFadeOut bool) *MovingHeart

func (*MovingHeart) Draw

func (m *MovingHeart) Draw(c Canvas) error

func (*MovingHeart) IsOut

func (m *MovingHeart) IsOut() bool

func (*MovingHeart) Update

func (m *MovingHeart) Update(elapsedBetweenUpdate time.Duration) bool

type MovingHearts

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

func NewMovingHearts

func NewMovingHearts(canvas Canvas, origin Point, nbMovingHearts int) *MovingHearts

func (*MovingHearts) Draw

func (h *MovingHearts) Draw(canvas Canvas) error

func (*MovingHearts) Update

func (h *MovingHearts) Update(elapsedBetweenUpdate time.Duration) bool
type OctoLogo struct {
	// contains filtered or unexported fields
}
func NewOctoLogo(canvas Canvas, center Point, radiusExt int) *OctoLogo

func (*OctoLogo) Draw

func (o *OctoLogo) Draw(canvas Canvas) error

func (*OctoLogo) Update

func (o *OctoLogo) Update(elapsedBetweenUpdate time.Duration) bool

Jump to

Keyboard shortcuts

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