Image
Represents an image.
Tags
Table of Contents
- $format : string|null
- Used for embedded images, in combination with a data child element.
- $height : int|null
- The image height in pixels (optional).
- $source : string|null
- The reference to the tileset image file (Tiled supports most common image formats).
- $width : int|null
- The image width in pixels (optional).
- getFormat() : string|null
- getHeight() : int|null
- getSource() : string|null
- getWidth() : int|null
- setFormat() : Image
- setHeight() : Image
- setSource() : Image
- setWidth() : Image
Properties
$format
Used for embedded images, in combination with a data child element.
private
string|null
$format
= null
Valid values are file extensions like png, gif, jpg, bmp, etc.
Tags
$height
The image height in pixels (optional).
private
int|null
$height
Tags
$source
The reference to the tileset image file (Tiled supports most common image formats).
private
string|null
$source
Only used if the image is not embedded.
Tags
$width
The image width in pixels (optional).
private
int|null
$width
Tags
Methods
getFormat()
public
getFormat() : string|null
Return values
string|null —getHeight()
public
getHeight() : int|null
Return values
int|null —getSource()
public
getSource() : string|null
Return values
string|null —getWidth()
public
getWidth() : int|null
Return values
int|null —setFormat()
public
setFormat(string|null $format) : Image
Parameters
- $format : string|null
Return values
Image —setHeight()
public
setHeight(int|null $height) : Image
Parameters
- $height : int|null
Return values
Image —setSource()
public
setSource(string|null $source) : Image
Parameters
- $source : string|null
Return values
Image —setWidth()
public
setWidth(int|null $width) : Image
Parameters
- $width : int|null