Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anchor ¶
An Anchor computes a point to treat as the position of an image, relative to image bounds. The computed point does not have to live within the image bounds.
func AnchorCenter ¶
func AnchorCenter() Anchor
AnchorCenter sets the anchor point in the middle of the image.
func AnchorNorthWest ¶
func AnchorNorthWest() Anchor
AnchorNorthWest sets the anchor point at the upper-leftmost corner of the image.
func AnchorSouth ¶
func AnchorSouth() Anchor
AnchorSouth sets the anchor point at the middle of the lower edge of the image.
type Camera ¶
type Camera struct {
// contains filtered or unexported fields
}
A Camera describes the coordinate tranformation between the world and the window.
The zero value looks at the origin point (pixel.ZV) in world coordinates.
type CameraController ¶
type CameraController struct {
// contains filtered or unexported fields
}
func NewCamController ¶
func NewCamController(cam *Camera) *CameraController
func (*CameraController) Process ¶
func (cont *CameraController) Process(src input.Source)
type GridDimensions ¶
func (GridDimensions) UnderCursor ¶
type GridOutline ¶
type GridOutline struct { Sprite Sprite Space *grid.Space Dims GridDimensions Margins Margins }
func (GridOutline) Draw ¶
func (o GridOutline) Draw(dst draw.Target)
type OrderedSpriteGroup ¶
type OrderedSpriteGroup struct {
// contains filtered or unexported fields
}
An OrderedSpriteGroup keeps track of a bunch of sprites and knows how to draw in the correct order. This assumes all the sprites are anchored at their bottom.
func (*OrderedSpriteGroup) Add ¶
func (group *OrderedSpriteGroup) Add(sprites ...Sprite)
Add sprites to draw. You need to add the sprites before each Draw call.
func (*OrderedSpriteGroup) Draw ¶
func (group *OrderedSpriteGroup) Draw()
Draw the added sprites. The set of sprites to draw and their order is forgotten afterwards.