shapes

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewCircle

func NewCircle(graphic *Graphic, center Point, radius int, fill bool) *Circle

func (*Circle) Draw

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

type CircleBL

type CircleBL struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewCircleBL

func NewCircleBL(graphic *Graphic, center Point, radius int, fill bool) *CircleBL

func (*CircleBL) Draw

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

type CircleBR

type CircleBR struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewCircleBR

func NewCircleBR(graphic *Graphic, center Point, radius int, fill bool) *CircleBR

func (*CircleBR) Draw

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

type CircleTL

type CircleTL struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewCircleTL

func NewCircleTL(graphic *Graphic, center Point, radius int, fill bool) *CircleTL

func (*CircleTL) Draw

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

type CircleTR

type CircleTR struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewCircleTR

func NewCircleTR(graphic *Graphic, center Point, radius int, fill bool) *CircleTR

func (*CircleTR) Draw

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

type Cross

type Cross struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewCross

func NewCross(graphic *Graphic, position Point, length int) *Cross

func (*Cross) Draw

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

func (*Cross) GetPosition

func (c *Cross) GetPosition() Point

func (*Cross) SetPosition

func (c *Cross) SetPosition(position Point)

type Dot

type Dot struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewDot

func NewDot(graphic *Graphic, position Point) *Dot

func (*Dot) Draw

func (d *Dot) Draw(canvas Canvas) error

func (*Dot) GetPosition

func (d *Dot) GetPosition() Point

func (*Dot) SetPosition

func (d *Dot) SetPosition(position Point)

type Free

type Free struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewFree

func NewFree(graphic *Graphic, pixels []Pixel) *Free

func (*Free) Draw

func (f *Free) Draw(canvas Canvas) error

type Img

type Img struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewGif

func NewGif(graphic *Graphic, path *string, targetSize Point) *Img

func NewGifFromFiles

func NewGifFromFiles(graphic *Graphic, targetSize Point, imgDuration time.Duration, paths ...string) *Img

func NewImg

func NewImg(graphic *Graphic, path *string, targetSize Point) *Img

func NewLazyImg

func NewLazyImg(graphic *Graphic, path *string, targetSize Point, afterEffect func(*Img)) *Img

func NewPngFromPaths

func NewPngFromPaths(graphic *Graphic, targetSize Point, paths ...string) *Img

func (*Img) Draw

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

func (*Img) GetActiveImage

func (i *Img) GetActiveImage() *image.Image

func (*Img) GetMask

func (i *Img) GetMask() image.Image

func (*Img) Images

func (i *Img) Images() *[]image.Image

func (*Img) Rotate

func (i *Img) Rotate(angle float64)

func (*Img) SetActiveImage

func (i *Img) SetActiveImage(activeImage *image.Image)

func (*Img) Update

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

type Line

type Line struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewLine

func NewLine(graphic *Graphic, start, end Point) *Line

func (*Line) Draw

func (l *Line) Draw(canvas Canvas) error

func (*Line) SetLine

func (l *Line) SetLine(start Point, end Point)

type Panel

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

func NewPanel

func NewPanel(parent *Graphic, layout *Layout, initialPosition Point, dimensions Point, cornerRadius int, fill, border bool) *Panel

func (*Panel) Draw

func (p *Panel) Draw(canvas Canvas) error

type Rectangle

type Rectangle struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewRectangle

func NewRectangle(graphic *Graphic, position Point, dimensions Point, fill bool) *Rectangle

func (*Rectangle) Draw

func (r *Rectangle) Draw(canvas Canvas) error

func (*Rectangle) SetMax

func (r *Rectangle) SetMax(max Point)

func (*Rectangle) SetMin

func (r *Rectangle) SetMin(min Point)

type Ring

type Ring struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewRing

func NewRing(graphic *Graphic, center Point, radiusExt, radiusInt int, fill bool) *Ring

func (*Ring) Draw

func (r *Ring) Draw(canvas Canvas) error

type ScrollingText

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

func NewScrollingText

func NewScrollingText(graphic *components.Graphic, c canvas.Canvas, txt string, f fonts.MatrixFont, position canvas.Point, visibleArea image.Rectangle, duration time.Duration) *ScrollingText

func (*ScrollingText) Draw

func (st *ScrollingText) Draw(canvas canvas.Canvas) error

func (*ScrollingText) SetText

func (st *ScrollingText) SetText(label string)

func (*ScrollingText) Update

func (st *ScrollingText) Update(elapsedBetweenUpdate time.Duration) bool

type Text

type Text struct {
	*Graphic
	// contains filtered or unexported fields
}

func NewText

func NewText(graphic *Graphic, position Point, txt string, f fonts.MatrixFont) *Text

func (*Text) Bounds

func (t *Text) Bounds() image.Rectangle

func (*Text) Draw

func (t *Text) Draw(canvas Canvas) error

func (*Text) SetColor

func (t *Text) SetColor(color color.Color)

func (*Text) SetOffset

func (t *Text) SetOffset(offset Point)

func (*Text) SetText

func (t *Text) SetText(txt string)

type TextPanel

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

func NewTextPanel

func NewTextPanel(text string, textColor color.Color, panelLayout *Layout, position, dimension Point, cornerRadius int, fill, border bool, font fonts.MatrixFont) *TextPanel

func (*TextPanel) Draw

func (t *TextPanel) Draw(canvas Canvas) error

func (*TextPanel) SetText

func (t *TextPanel) SetText(text string)

func (*TextPanel) Update

func (t *TextPanel) Update(elapsedBetweenUpdate time.Duration) bool

Jump to

Keyboard shortcuts

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