Documentation

Rectangle extends DrawObject

Representation of a rectangle inside a object layer.

This class represents a rectangle inside an object layer.

Tags
see
https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#polygon

Documentation

Table of Contents

$gid  : int|null
A reference to a tile.
$height  : float
The height of the object in pixels.
$id  : int|null
Unique ID of the object.
$name  : string|null
The name of the object.
$propertyBag  : PropertyBag|null
$rotation  : string
The rotation of the object in degrees clockwise around (x, y).
$type  : string|null
The type of the object.
$visible  : bool
Whether the object is shown (1) or hidden (0).
$width  : float
The width of the object in pixels.
$x  : float
The x coordinate of the object in pixels.
$y  : float
The y coordinate of the object in pixels.
getGid()  : int|null
getHeight()  : float
getId()  : int|null
getName()  : string|null
getPropertyBag()  : PropertyBag|null
getRotation()  : string
getType()  : string|null
getWidth()  : float
getX()  : float
getY()  : float
isVisible()  : bool
setGid()  : DrawObject
setHeight()  : DrawObject
setId()  : DrawObject
setName()  : DrawObject
setPropertyBag()  : self
setRotation()  : DrawObject
setType()  : DrawObject
setVisible()  : DrawObject
setWidth()  : DrawObject
setX()  : DrawObject
setY()  : DrawObject

Properties

Methods

getGid()

public getGid() : int|null
Return values
int|null

getHeight()

public getHeight() : float
Return values
float

getId()

public getId() : int|null
Return values
int|null

getName()

public getName() : string|null
Return values
string|null

getRotation()

public getRotation() : string
Return values
string

getType()

public getType() : string|null
Return values
string|null

getWidth()

public getWidth() : float
Return values
float

getX()

public getX() : float
Return values
float

getY()

public getY() : float
Return values
float

isVisible()

public isVisible() : bool
Return values
bool

Search results