use of main.system.images.ImageManager.HIGHLIGHT in project Eidolons by IDemiurge.
the class MiniObjComp method applyHighlights.
private void applyHighlights() {
if (hl != null) {
Map<HIGHLIGHT, BufferedImage> highlightedImageCache = highlightedImageCacheMap.get(image);
if (highlightedImageCache == null) {
highlightedImageCache = new HashMap<>();
highlightedImageCacheMap.put(image, highlightedImageCache);
}
BufferedImage buffer = highlightedImageCache.get(hl);
if (buffer == null) {
buffer = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
buffer.getGraphics().drawImage(image, 0, 0, width, height, null);
Image sizedVersion = ImageManager.getSizedIcon(hl.getBorder().getImagePath(), size).getImage();
buffer.getGraphics().drawImage(sizedVersion, 0, 0, null);
highlightedImageCache.put(hl, buffer);
}
image = buffer;
}
boolean terrain = (obj instanceof DC_Cell);
if (terrain) {
// green?
} else if (obj.isInfoSelected()) {
image = ImageManager.applyImageNew(image, ImageManager.BORDER_INFO_SELECTION_HIGHLIGHT.getImage());
}
// image = ImageManager.applyBorder(image,
// ImageManager.BORDER_INFO_SELECTION_HIGHLIGHT);
}
Aggregations