Java Code Examples for net.runelite.api.NPC#getCanvasTilePoly()
The following examples show how to use
net.runelite.api.NPC#getCanvasTilePoly() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbyssOverlay.java From plugins with GNU General Public License v3.0 | 6 votes |
private void highlightDarkMage(Graphics2D graphics) { if (!plugin.isDegradedPouchInInventory()) { return; } NPC darkMage = plugin.getDarkMage(); if (darkMage == null) { return; } Polygon tilePoly = darkMage.getCanvasTilePoly(); if (tilePoly == null) { return; } OverlayUtil.renderPolygon(graphics, tilePoly, Color.green); }
Example 2
Source File: AbyssOverlay.java From runelite with BSD 2-Clause "Simplified" License | 6 votes |
private void highlightDarkMage(Graphics2D graphics) { if (!plugin.isDegradedPouchInInventory()) { return; } NPC darkMage = plugin.getDarkMage(); if (darkMage == null) { return; } Polygon tilePoly = darkMage.getCanvasTilePoly(); if (tilePoly == null) { return; } OverlayUtil.renderPolygon(graphics, tilePoly, Color.green); }
Example 3
Source File: ShayzienInfirmaryOverlay.java From plugins with GNU General Public License v3.0 | 5 votes |
@Override public Dimension render(Graphics2D graphics) { if (plugin.isNotAtInfirmary()) { return null; } for (NPC npc : plugin.getUnhealedSoldiers()) { Polygon tilePoly = npc.getCanvasTilePoly(); if (tilePoly == null) { continue; } OverlayUtil.renderPolygon(graphics, npc.getCanvasTilePoly(), Color.ORANGE); Point imageLocation = npc.getCanvasImageLocation(medPackImage, 25); if (imageLocation == null) { continue; } Composite originalComposite = graphics.getComposite(); Composite translucentComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.8f); graphics.setComposite(translucentComposite); OverlayUtil.renderImageLocation(graphics, imageLocation, medPackImage); graphics.setComposite(originalComposite); } return null; }
Example 4
Source File: CoreOverlay.java From plugins with GNU General Public License v3.0 | 5 votes |
@Override public Dimension render(Graphics2D graphics) { NPC core = corpPlugin.getCore(); if (core != null) { Polygon canvasTilePoly = core.getCanvasTilePoly(); if (canvasTilePoly != null) { OverlayUtil.renderPolygon(graphics, canvasTilePoly, Color.RED.brighter()); } } return null; }
Example 5
Source File: CoreOverlay.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Override public Dimension render(Graphics2D graphics) { NPC core = corpPlugin.getCore(); if (core != null) { Polygon canvasTilePoly = core.getCanvasTilePoly(); if (canvasTilePoly != null) { OverlayUtil.renderPolygon(graphics, canvasTilePoly, Color.RED.brighter()); } } return null; }