Documentation
¶
Overview ¶
Package graphic is using the sdl2 go interface from (c)https://github.com/veandco/go-sdl2/ under the BSD 3 License
Package graphic is using the sdl2 go interface from (c)https://github.com/veandco/go-sdl2/ under the BSD 3 License
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graphic ¶
type Graphic struct { Sprites []Sprite Renderer *sdl.Renderer // contains filtered or unexported fields }
Graphic contains the information required to render a window with diffrent Sprites
func New ¶
func New(title string, x, y, width, heigh int32, WindowFlags, RendererFlags uint32) (Graphic, error)
New returns a Graphic object with initialized renderer and window note that Sprites have to be added manual
func (*Graphic) AddSprite ¶
AddSprite adds another sprite which can be used be creating a instance of it see Sprite.NewInstance
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance position angle and the center of an instance of a sprite
func (*Instance) NewPosition ¶
NewPosition sets the position of this instance center is the center of the instances new position