Layer extends TileLayer implements Printable, PropertyBagHolder Uses PropertyBagTrait
Represents a layer.
A layer contains different tiles which can be printed
Tags
Interfaces, Classes and Traits
- Printable
- Marks something as a printable layer.
- PropertyBagHolder
- Interface for all elements, which contains properties.
Table of Contents
- $height : int|null
- The height of the layer in tiles. Always the same as the map height for fixed-size maps.
- $id : int|null
- Unique ID of the layer.
- $layerData : LayerData|null
- Data which are under this layer.
- $map : Map|null
- The map object, which holds this layer.
- $name : string|null
- The name of the layer.
- $offsetX : float
- Horizontal offset for this layer in pixels. Defaults to 0.
- $offsetY : float
- Vertical offset for this layer in pixels. Defaults to 0.
- $opacity : float|null
- The opacity of the layer as a value from 0 to 1.
- $order : int
- Which order in the map should this tileLayer be rendered.
- $propertyBag : PropertyBag|null
- $tintColor : string|null
- A color that is multiplied with any tiles drawn by this layer in #AARRGGBB or #RRGGBB format.
- $visible : bool
- Whether the layer is shown (1) or hidden (0).
- $width : int|null
- The width of the layer in tiles. Always the same as the map width for fixed-size maps.
- $x : int
- The x coordinate of the layer in tiles.
- $y : int
- The y coordinate of the layer in tiles.
- getHeight() : int|null
- getId() : int|null
- getLayerData() : LayerData|null
- getMap() : Map|null
- getName() : string|null
- getOffsetX() : float
- getOffsetY() : float
- getOpacity() : float|null
- getOrder() : int
- getPropertyBag() : PropertyBag|null
- getTintColor() : string|null
- getWidth() : int|null
- getX() : int
- getY() : int
- isVisible() : bool
- setHeight() : Layer
- setId() : TileLayer
- setLayerData() : Layer
- setMap() : TileLayer
- setName() : TileLayer
- setOffsetX() : TileLayer
- setOffsetY() : TileLayer
- setOpacity() : TileLayer
- setOrder() : Layer
- setPropertyBag() : self
- setTintColor() : TileLayer
- setVisible() : TileLayer
- setWidth() : Layer
- setX() : Layer
- setY() : Layer
Properties
$height
The height of the layer in tiles. Always the same as the map height for fixed-size maps.
private
int|null
$height
Tags
$id
Unique ID of the layer.
private
int|null
$id
= null
Tags
$layerData
Data which are under this layer.
private
LayerData|null
$layerData
Tags
$map
The map object, which holds this layer.
private
Map|null
$map
Tags
$name
The name of the layer.
private
string|null
$name
= null
Tags
$offsetX
Horizontal offset for this layer in pixels. Defaults to 0.
private
float
$offsetX
= 0.0
Tags
$offsetY
Vertical offset for this layer in pixels. Defaults to 0.
private
float
$offsetY
= 0.0
Tags
$opacity
The opacity of the layer as a value from 0 to 1.
private
float|null
$opacity
= 1.0
Tags
$order
Which order in the map should this tileLayer be rendered.
private
int
$order
= 0
Tags
$propertyBag
private
PropertyBag|null
$propertyBag
= null
Tags
$tintColor
A color that is multiplied with any tiles drawn by this layer in #AARRGGBB or #RRGGBB format.
private
string|null
$tintColor
= null
Tags
$visible
Whether the layer is shown (1) or hidden (0).
private
bool
$visible
= true
Tags
$width
The width of the layer in tiles. Always the same as the map width for fixed-size maps.
private
int|null
$width
Tags
$x
The x coordinate of the layer in tiles.
private
int
$x
= 0
Tags
$y
The y coordinate of the layer in tiles.
private
int
$y
= 0
Tags
Methods
getHeight()
public
getHeight() : int|null
Return values
int|null —getId()
public
getId() : int|null
Return values
int|null —getLayerData()
public
getLayerData() : LayerData|null
Return values
LayerData|null —getMap()
public
getMap() : Map|null
Return values
Map|null —getName()
public
getName() : string|null
Return values
string|null —getOffsetX()
public
getOffsetX() : float
Return values
float —getOffsetY()
public
getOffsetY() : float
Return values
float —getOpacity()
public
getOpacity() : float|null
Return values
float|null —getOrder()
public
getOrder() : int
Return values
int —getPropertyBag()
public
getPropertyBag() : PropertyBag|null
Return values
PropertyBag|null —getTintColor()
public
getTintColor() : string|null
Return values
string|null —getWidth()
public
getWidth() : int|null
Return values
int|null —getX()
public
getX() : int
Return values
int —getY()
public
getY() : int
Return values
int —isVisible()
public
isVisible() : bool
Return values
bool —setHeight()
public
setHeight(int|null $height) : Layer
Parameters
- $height : int|null
Return values
Layer —setId()
public
setId(int|null $id) : TileLayer
Parameters
- $id : int|null
Return values
TileLayer —setLayerData()
public
setLayerData(LayerData|null $layerData) : Layer
Parameters
- $layerData : LayerData|null
Return values
Layer —setMap()
public
setMap(Map|null $map) : TileLayer
Parameters
- $map : Map|null
Return values
TileLayer —setName()
public
setName(string|null $name) : TileLayer
Parameters
- $name : string|null
Return values
TileLayer —setOffsetX()
public
setOffsetX(float $offsetX) : TileLayer
Parameters
- $offsetX : float
Return values
TileLayer —setOffsetY()
public
setOffsetY(float $offsetY) : TileLayer
Parameters
- $offsetY : float
Return values
TileLayer —setOpacity()
public
setOpacity(float|null $opacity) : TileLayer
Parameters
- $opacity : float|null
Return values
TileLayer —setOrder()
public
setOrder(int $order) : Layer
Parameters
- $order : int
Return values
Layer —setPropertyBag()
public
setPropertyBag(PropertyBag|null $propertyBag) : self
Parameters
- $propertyBag : PropertyBag|null
Return values
self —setTintColor()
public
setTintColor(string|null $tintColor) : TileLayer
Parameters
- $tintColor : string|null
Return values
TileLayer —setVisible()
public
setVisible(bool $visible) : TileLayer
Parameters
- $visible : bool
Return values
TileLayer —setWidth()
public
setWidth(int|null $width) : Layer
Parameters
- $width : int|null
Return values
Layer —setX()
public
setX(int $x) : Layer
Parameters
- $x : int
Return values
Layer —setY()
public
setY(int $y) : Layer
Parameters
- $y : int