runelite-api: Use more general Shape for clickboxes and convex hulls

This commit is contained in:
Max Weber
2019-09-09 08:19:28 -06:00
parent cd1cf905c4
commit a4cfbc3b42
15 changed files with 45 additions and 41 deletions

View File

@@ -26,6 +26,7 @@ package net.runelite.api;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.Shape;
import java.awt.image.BufferedImage;
import javax.annotation.Nullable;
import net.runelite.api.annotations.VisibleForDevtools;
@@ -218,7 +219,7 @@ public interface Actor extends Renderable
* @return the convex hull
* @see net.runelite.api.model.Jarvis
*/
Polygon getConvexHull();
Shape getConvexHull();
/**
* Gets the world area that the actor occupies.

View File

@@ -24,7 +24,7 @@
*/
package net.runelite.api;
import java.awt.Polygon;
import java.awt.Shape;
/**
* Represents a decorative object, such as an object on a wall.
@@ -37,8 +37,8 @@ public interface DecorativeObject extends TileObject
* @return the convex hull
* @see net.runelite.api.model.Jarvis
*/
Polygon getConvexHull();
Polygon getConvexHull2();
Shape getConvexHull();
Shape getConvexHull2();
Renderable getRenderable();
Renderable getRenderable2();

View File

@@ -24,7 +24,7 @@
*/
package net.runelite.api;
import java.awt.Polygon;
import java.awt.Shape;
import net.runelite.api.coords.Angle;
/**
@@ -54,12 +54,12 @@ public interface GameObject extends TileObject
Point getSceneMaxLocation();
/**
* Gets the convex hull of the actors model.
* Gets the convex hull of the object's model.
*
* @return the convex hull
* @see net.runelite.api.model.Jarvis
*/
Polygon getConvexHull();
Shape getConvexHull();
/**
* Gets the orientation of the object.

View File

@@ -26,7 +26,7 @@ package net.runelite.api;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.geom.Area;
import java.awt.Shape;
import javax.annotation.Nullable;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
@@ -132,5 +132,5 @@ public interface TileObject
* @return the clickable area
*/
@Nullable
Area getClickbox();
Shape getClickbox();
}

View File

@@ -24,7 +24,7 @@
*/
package net.runelite.api;
import java.awt.Polygon;
import java.awt.Shape;
/**
* Represents one or two walls on a tile
@@ -63,8 +63,8 @@ public interface WallObject extends TileObject
* @return the convex hull
* @see net.runelite.api.model.Jarvis
*/
Polygon getConvexHull();
Polygon getConvexHull2();
Shape getConvexHull();
Shape getConvexHull2();
Renderable getRenderable1();
Renderable getRenderable2();