Scratch for Java

MapObject::getShape()

Returns a Shape object representing the current map object. The type of Shape returned depends on the properties of the map object: - If the object is a point, a 1x1 rectangle is returned. - If the object is an ellipse, an Ellipse2D object with the specified width and height is returned. - If the object is a polygon, a Polygon object with the specified points is returned.

  • If none of the above conditions are met, a rectangle with the specified width and height is returned.

Syntax

Java

.getShape()

Return

Shape

getShape()