APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.maps.objects

public Class RectangleMapObject

extends MapObject
Class Inheritance
Imports
com.badlogic.gdx.maps.MapObject, com.badlogic.gdx.math.Rectangle

@brief Represents a rectangle shaped map object

Field Summary

Modifier and TypeField and Description
private Rectangle

Constructor Summary

AccessConstructor and Description
public
RectangleMapObject()

Creates a rectangle object which lower left corner is at (0, 0) with width=1 and height=1

public
RectangleMapObject(float
X coordinate
x
,
float
Y coordinate
y
,
float
Width of the Rectangle to be created.
width
,
float
Height of the Rectangle to be created.
height
)

Creates a Rectangle object with the given X and Y coordinates along with a given width and height.

Method Summary

Modifier and TypeMethod and Description
public Rectangle
getRectangle()

Returns: rectangle shape

Inherited from com.badlogic.gdx.maps.MapObject:
getColorgetNamegetOpacitygetPropertiesisVisiblesetColorsetNamesetOpacitysetVisible

Field Detail

rectangleback to summary
private Rectangle rectangle

Constructor Detail

RectangleMapObjectback to summary
public RectangleMapObject()

Creates a rectangle object which lower left corner is at (0, 0) with width=1 and height=1

RectangleMapObjectback to summary
public RectangleMapObject(float x, float y, float width, float height)

Creates a Rectangle object with the given X and Y coordinates along with a given width and height.

Parameters
x:float

X coordinate

y:float

Y coordinate

width:float

Width of the Rectangle to be created.

height:float

Height of the Rectangle to be created.

Method Detail

getRectangleback to summary
public Rectangle getRectangle()
Returns:Rectangle

rectangle shape