Constructs a new map object, which can be added to an ObjectGroup.
Constructs a new map object of the given shape, which can be added to an ObjectGroup.
The asset this object is part of, or null
.
The font of a text object.
Height of the object in pixels.
Unique (map-wide) ID of the object.
Layer this object is part of (or null
in case of a standalone
object).
Map this object is part of (or null
in case of a
standalone object).
Name of the object.
Polygon of the object.
Position of the object in pixels.
Whether the object is read-only.
Rotation of the object in degrees clockwise.
Whether the object is selected.
Shape of the object.
Size of the object in pixels.
The text of a text object.
The alignment of a text object. Can be set using a combination of Qt.Alignment flags.
Color of a text object.
Tile of the object.
Whether the tile is flipped horizontally.
Whether the tile is flipped vertically.
Type of the object.
Width of the object in pixels.
Whether the text of a text object wraps based on the width of the object.
X coordinate of the object in pixels.
Y coordinate of the object in pixels.
Returns all custom properties set on this object.
Modifications to the properties will not affect the original object. Does not include inherited values (see resolvedProperties).
Returns the value of the custom property with the given name, or
undefined
if no such property is set on the object. Does not
include inherited values (see resolvedProperty).
file
properties are returned as FilePath.
object
properties are returned as MapObject when possible,
or ObjectRef when the object could not be found.
Removes the custom property with the given name.
Returns all custom properties set on this object. Modifications to the properties will not affect the original object. Includes values inherited from object types, templates and tiles where applicable.
Returns the value of the custom property with the given name, or
undefined
if no such property is set. Includes values inherited
from object types, templates and tiles where applicable.
Sets the value of the custom property with the given name to the given color value.
The color is specified as a string "#RGB", "#RRGGBB" or "#AARRGGBB".
Sets the value of the custom property with the given name to the given color value.
The color is specified by its red, green, blue and alpha components. Each component takes a value from 0 to 255. When not provided, the alpha defaults to 255.
Sets the value of the custom property with the given name to the given float value.
This function is provided as alternative to setProperty, since
that function will set whole numbers as int
properties.
Replaces all currently set custom properties with a new set of properties.
Sets the value of the custom property with the given name.
Supported types are bool
, number
, string
, color,
FilePath, ObjectRef, MapObject and
PropertyValue.
Sets the value of an object's property identified by the given path to the given value.
The path is a list of property names, where each name identifies a member of the previous member's value. The last name in the list identifies the property to set.
Supported types are bool
, number
, string
, color,
FilePath, ObjectRef, MapObject and
PropertyValue.
Generated using TypeDoc
An object that can be part of an ObjectGroup.