Added ability to change width and height for the visual image

Change indentation to 2 spaces instead of 4
Added ImageHandler.java for basic Image related things
Added 2 new speedometer images for scaling purposes
Updated to version 3
Gave gradle more ram
Added the new translatable texts to en_us.json
This commit is contained in:
2023-07-11 15:17:48 +02:00
parent 64a35df67d
commit dc757d8fa1
13 changed files with 719 additions and 601 deletions

View File

@@ -0,0 +1,14 @@
package me.zacharias.speedometer;
import java.awt.*;
import java.awt.image.BufferedImage;
public class ImageHandler {
public static BufferedImage scale(BufferedImage img, int width, int height) {
Image img1 = img.getScaledInstance(width,height, Image.SCALE_DEFAULT);
BufferedImage out = new BufferedImage(width, height,BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = out.createGraphics();
g2d.drawImage(img1,0,0,null);
return out;
}
}