Package net.openosrs.api.input.target
Class PointDestination
- java.lang.Object
-
- net.openosrs.api.input.target.Destination
-
- net.openosrs.api.input.target.PointDestination
-
public class PointDestination extends Destination
A bare canvas coordinate with a small tolerance around it.Used when a caller already knows exactly where it wants to click, and for the idle behaviours that move the cursor somewhere unremarkable. The radius exists so that even an explicit point is not clicked pixel-identically twice.
-
-
Constructor Summary
Constructors Constructor Description PointDestination(int x, int y)PointDestination(int x, int y, int radius, java.lang.String label)PointDestination(net.runelite.api.Point point)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancameraCanHelp()Whether the camera can plausibly fix this destination at all.java.lang.Stringdescribe()A short label for logging and the overlay.booleanneedsCamera()Whether reaching this destination needs the camera moved first.java.awt.Shapeshape()The raw clickable outline in canvas pixels, ornullwhen the target has no projection at all.-
Methods inherited from class net.openosrs.api.input.target.Destination
area, bounds, centre, contains, focusPoint, getViewport, isCurrent, isVisible, needsScroll, scrollContainer, scrollDirection, suitablePoint, toString, visibleShape, withValidity, withViewport
-
-
-
-
Method Detail
-
shape
public java.awt.Shape shape()
Description copied from class:DestinationThe raw clickable outline in canvas pixels, ornullwhen the target has no projection at all.This is unclipped on purpose. The client projects actors and objects that are behind or beside the camera to coordinates far outside the canvas rather than returning null, so a non-null shape here is not a claim that anything is on screen. Use
Destination.visibleShape()for that.- Specified by:
shapein classDestination
-
describe
public java.lang.String describe()
Description copied from class:DestinationA short label for logging and the overlay.- Specified by:
describein classDestination
-
cameraCanHelp
public boolean cameraCanHelp()
Description copied from class:DestinationWhether the camera can plausibly fix this destination at all. A dropped item four hundred tiles away needs walking, not rotating, and the backend should not spin the camera pointlessly before giving up.- Overrides:
cameraCanHelpin classDestination
-
needsCamera
public boolean needsCamera()
Description copied from class:DestinationWhether reaching this destination needs the camera moved first. Targets that are simply off screen answertrue; fixed screen furniture such as an inventory slot never does.- Overrides:
needsCamerain classDestination
-
-