image

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

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

Image object implementation

func New

func New(url string, x, y, w, h int32) *Image

New create Image object

func (Image) Click

func (I Image) Click()

Click define a click on object

func (Image) Clone

func (I Image) Clone(r *sdl.Renderer) (*Image, error)

Clone object and return a new

func (*Image) Close

func (I *Image) Close() error

Close sdl ressources needest to object

func (Image) Draw

func (I Image) Draw(wg *sync.WaitGroup, r *sdl.Renderer)

Draw the object

func (Image) GetColor

func (I Image) GetColor() (r, g, b, a uint8)

GetColor object (current color by status)

func (Image) GetPosition

func (I Image) GetPosition() (int32, int32)

GetPosition object (x, y)

func (Image) GetSize

func (I Image) GetSize() (int32, int32)

GetSize object (width, height)

func (Image) GetStatus

func (I Image) GetStatus() uint8

GetStatus to object

func (*Image) Init

func (I *Image) Init(r *sdl.Renderer) error

Init object to draw it. If error occurred, object can't be drawn

func (Image) IsInit

func (I Image) IsInit() bool

IsInit return status initialize

func (Image) IsOver

func (I Image) IsOver(xRef, yRef int32) bool

IsOver define if object and position parameters matches

func (*Image) MoveTo

func (I *Image) MoveTo(x, y int32)

MoveTo by increment position with x and y parameters

func (*Image) SetAction

func (I *Image) SetAction(f func(...interface{}), d ...interface{})

SetAction to get it on click button

func (*Image) SetStatus

func (I *Image) SetStatus(s uint8)

SetStatus change object's status

func (*Image) SetVariantStyle

func (I *Image) SetVariantStyle(basicURL, overURL, clickURL string)

SetVariantStyle define styles to interact with object.

func (*Image) UpdateColor

func (I *Image) UpdateColor(red, g, b, a uint8, r *sdl.Renderer)

UpdateColor to change color of initialized object

func (*Image) UpdatePosition

func (I *Image) UpdatePosition(x, y int32)

UpdatePosition object

func (*Image) UpdateSize

func (I *Image) UpdateSize(w, h int32)

UpdateSize to change size of initialized object

Jump to

Keyboard shortcuts

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