Documentation ¶
Index ¶
- Variables
- type OrthogonalRendererEngine
- func (e *OrthogonalRendererEngine) GetFinalImageSize() image.Rectangle
- func (e *OrthogonalRendererEngine) GetTilePosition(x, y int) image.Rectangle
- func (e *OrthogonalRendererEngine) Init(m *tiled.Map)
- func (e *OrthogonalRendererEngine) RotateTileImage(tile *tiled.LayerTile, img image.Image) image.Image
- type Renderer
- type RendererEngine
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedOrientation represents an error in the unsupported orientation for rendering. ErrUnsupportedOrientation = errors.New("tiled/render: unsupported orientation") // ErrUnsupportedRenderOrder represents an error in the unsupported order for rendering. ErrUnsupportedRenderOrder = errors.New("tiled/render: unsupported render order") )
Functions ¶
This section is empty.
Types ¶
type OrthogonalRendererEngine ¶
type OrthogonalRendererEngine struct {
// contains filtered or unexported fields
}
OrthogonalRendererEngine represents orthogonal rendering engine.
func (*OrthogonalRendererEngine) GetFinalImageSize ¶
func (e *OrthogonalRendererEngine) GetFinalImageSize() image.Rectangle
GetFinalImageSize returns final image size based on map data.
func (*OrthogonalRendererEngine) GetTilePosition ¶
func (e *OrthogonalRendererEngine) GetTilePosition(x, y int) image.Rectangle
GetTilePosition returns tile position in image.
func (*OrthogonalRendererEngine) Init ¶
func (e *OrthogonalRendererEngine) Init(m *tiled.Map)
Init initializes rendering engine with provided map options.
func (*OrthogonalRendererEngine) RotateTileImage ¶
func (e *OrthogonalRendererEngine) RotateTileImage(tile *tiled.LayerTile, img image.Image) image.Image
RotateTileImage rotates provided tile layer.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer represents an rendering engine.
func NewRenderer ¶
NewRenderer creates new rendering engine instance.
func (*Renderer) RenderLayer ¶
RenderLayer renders single map layer.
func (*Renderer) RenderVisibleLayers ¶
RenderVisibleLayers renders all visible map layers.
func (*Renderer) SaveAsJpeg ¶
SaveAsJpeg writes rendered layers as JPEG image to provided writer.
type RendererEngine ¶
type RendererEngine interface { Init(m *tiled.Map) GetFinalImageSize() image.Rectangle RotateTileImage(tile *tiled.LayerTile, img image.Image) image.Image GetTilePosition(x, y int) image.Rectangle }
RendererEngine is the interface implemented by objects that provide rendering engine for Tiled maps.
Click to show internal directories.
Click to hide internal directories.