Removed outline from freezetimers

This commit is contained in:
James Munson
2019-04-20 16:19:16 -07:00
parent e7aec705ba
commit 2f7eb66555
2 changed files with 17 additions and 27 deletions

View File

@@ -146,13 +146,12 @@ public class FreezeTimersOverlay extends Overlay
Point imageLocation = new Point(textLocation.getX() - width, ((textLocation.getY() - Point imageLocation = new Point(textLocation.getX() - width, ((textLocation.getY() -
graphics.getFontMetrics().getHeight()) + 10)); graphics.getFontMetrics().getHeight()) + 10));
graphics.setFont(FontManager.getRunescapeFont()); graphics.setFont(FontManager.getRunescapeFont());
graphics.setStroke(new BasicStroke(3)); // graphics.setStroke(new BasicStroke(3));
if (config.spellIcon()) if (config.spellIcon())
{ {
frozenoverlay = true; frozenoverlay = true;
graphics.drawOval(imageLocation.getX(), imageLocation.getY(), clanchatImage.getWidth(), // graphics.drawOval(imageLocation.getX(), imageLocation.getY(), clanchatImage.getWidth(), clanchatImage.getHeight());
clanchatImage.getHeight());
OverlayUtil.renderImageLocation(graphics, imageLocation, clanchatImage); OverlayUtil.renderImageLocation(graphics, imageLocation, clanchatImage);
OverlayUtil.renderTextLocation(graphics, textLocation, String.valueOf(timer), color); OverlayUtil.renderTextLocation(graphics, textLocation, String.valueOf(timer), color);

View File

@@ -411,17 +411,14 @@ public class FreezeTimersPlugin extends Plugin
} }
} }
private static IndexedSprite createIndexedSprite(final Client client, final BufferedImage bufferedImage) private static IndexedSprite createIndexedSprite(Client client, BufferedImage bufferedImage) {
{ IndexColorModel indexedCM = (IndexColorModel)bufferedImage.getColorModel();
final IndexColorModel indexedCM = (IndexColorModel) bufferedImage.getColorModel(); int width = bufferedImage.getWidth();
int height = bufferedImage.getHeight();
final int width = bufferedImage.getWidth(); byte[] pixels = ((DataBufferByte)bufferedImage.getRaster().getDataBuffer()).getData();
final int height = bufferedImage.getHeight(); int[] palette = new int[indexedCM.getMapSize()];
final byte[] pixels = ((DataBufferByte) bufferedImage.getRaster().getDataBuffer()).getData();
final int[] palette = new int[indexedCM.getMapSize()];
indexedCM.getRGBs(palette); indexedCM.getRGBs(palette);
IndexedSprite newIndexedSprite = client.createIndexedSprite();
final IndexedSprite newIndexedSprite = client.createIndexedSprite();
newIndexedSprite.setPixels(pixels); newIndexedSprite.setPixels(pixels);
newIndexedSprite.setPalette(palette); newIndexedSprite.setPalette(palette);
newIndexedSprite.setWidth(width); newIndexedSprite.setWidth(width);
@@ -433,20 +430,14 @@ public class FreezeTimersPlugin extends Plugin
return newIndexedSprite; return newIndexedSprite;
} }
private static BufferedImage rgbaToIndexedBufferedImage(final BufferedImage sourceBufferedImage) private static BufferedImage rgbaToIndexedBufferedImage(BufferedImage sourceBufferedImage) {
{ BufferedImage indexedImage = new BufferedImage(sourceBufferedImage.getWidth(), sourceBufferedImage.getHeight(), BufferedImage.TYPE_BYTE_INDEXED);
final BufferedImage indexedImage = new BufferedImage( ColorModel cm = indexedImage.getColorModel();
sourceBufferedImage.getWidth(), IndexColorModel icm = (IndexColorModel)cm;
sourceBufferedImage.getHeight(), int size = icm.getMapSize();
BufferedImage.TYPE_BYTE_INDEXED); byte[] reds = new byte[size];
byte[] greens = new byte[size];
final ColorModel cm = indexedImage.getColorModel(); byte[] blues = new byte[size];
final IndexColorModel icm = (IndexColorModel) cm;
final int size = icm.getMapSize();
final byte[] reds = new byte[size];
final byte[] greens = new byte[size];
final byte[] blues = new byte[size];
icm.getReds(reds); icm.getReds(reds);
icm.getGreens(greens); icm.getGreens(greens);
icm.getBlues(blues); icm.getBlues(blues);