Documentation ¶
Index ¶
Constants ¶
const ( TileLayerDrawer = iota ObjectGroupDrawer ImageLayerDrawer GroupDrawer )
Drawer Types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drawer ¶
Drawer is the base interface for the pixeltmx library, there are 4 concrete implementations for the 4 types of tmx layers (tile layer, object group, image layer, group layer). The underlying type can be extracted using `Type()` method. Each Layer will be updated once on creation and remain cached for subsequent draws. If the underlying data or resources have been changed, the `Update()` method must be called before the changes will be visible when drawing.
type LayerInfo ¶
type LayerInfo struct {
// contains filtered or unexported fields
}
LayerInfo provides drawing information for the layer, it holds the recursively calculated offset, visibility, and color information, as well as a reference to the base map data. It prevides easy methods translating between tmx and pixel world coordinates.
func (*LayerInfo) TMXToPixelRect ¶
TMXToPixelRect translates a TMX four-tuple (x, y, w, h) to a pixel.Rect in pixel world coordinates.
func (*LayerInfo) TMXToPixelVec ¶
TMXToPixelVec translates TMX x and y coordinates to a pixel.Vect in pixel world coordinates.
type Resources ¶
type Resources struct {
// contains filtered or unexported fields
}
Resources holds all the raw images and miscellaneous files required for rendering a TMX map. This includes tilesets and tileset pictures, raw images, object templates, etc.
func LoadResources ¶
LoadResources searches through the tmx map tree and loads any resources found. If the resources are located somewhere other than the current working directory, the location should be supplied in the path string.
Notes ¶
Bugs ¶
something strange is happening with polygon rendering.