OverlayUtil

Methods
9
Fields
None

Methods

MethodReturnsDescription
renderPolygon(Graphics2D, Shape, Color)()(Graphics2D, Shape, Color) -> (): Outlines poly in color with a 2 px stroke, then fills it with Color.new(0, 0, 0, 50); the stroke…
renderPolygon(Graphics2D, Shape, Color, BasicStroke)()
renderPolygon(Graphics2D, Shape, Color, Color, BasicStroke)()
renderMinimapLocation(Graphics2D, Point, Color)()A 4 px dot at mini in color (made opaque) over a black one a pixel lower.
renderTextLocation(Graphics2D, Point, string?, Color)()text with its baseline at txtLoc, in color made opaque, over a black copy one pixel down and right. Nothing for nil or empty text.
renderImageLocation(Client, Graphics2D, LocalPoint, BufferedImage, number)()(Client, Graphics2D, LocalPoint, BufferedImage, number) -> (): Draws image centred over the local point, zOffset up (`Perspective.get…
renderImageLocation(Graphics2D, Point, BufferedImage?)()
renderActorOverlay(Graphics2D, Actor, string?, Color)()The actor's tile (renderPolygon) and text above it at its logical height + 40 (renderTextLocation).
renderActorOverlayImage(Graphics2D, Actor, BufferedImage, Color, number)()The actor's tile (renderPolygon) and image centred zOffset above it.
renderTileOverlay(Graphics2D, TileObject, string?, Color)()(Graphics2D, TileObject, string?, Color) -> (): The object's tiles (renderPolygon), its minimap dot, and text at its location.
renderTileOverlay(Client, Graphics2D, LocalPoint, BufferedImage, Color)()
renderHoverableArea(Graphics2D, Shape?, Point, Color, Color, Color)()Outlines area (in borderHoverColor when it contains the mouse, else borderColor) and fills it in fillColor. Nothing for nil.
setGraphicProperties(Graphics2D)()Turns antialiasing on, as the renderer does for every layer.

Method details

renderPolygon

renderPolygon: ((Graphics2D, Shape, Color) -> ()) & ((Graphics2D, Shape, Color, BasicStroke) -> ()) & ((Graphics2D, Shape, Color, Color, BasicStroke) -> ())

(Graphics2D, Shape, Color) -> (): Outlines poly in color with a 2 px stroke, then fills it with Color.new(0, 0, 0, 50); the stroke is put back.

(Graphics2D, Shape, Color, BasicStroke) -> (): As the three-argument form, outlined with borderStroke.

(Graphics2D, Shape, Color, Color, BasicStroke) -> (): Outlines poly in color with borderStroke, fills it with fillColor, and puts the stroke back.

renderTextLocation

renderTextLocation: (Graphics2D, Point, string?, Color) -> ()

text with its baseline at txtLoc, in color made opaque, over a black copy one pixel down and right. Nothing for nil or empty text.