From 087f5404658a1543834f16a89e3436f8399297f6 Mon Sep 17 00:00:00 2001 From: nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> Date: Sun, 5 Jun 2022 10:36:43 +0100 Subject: Reformat code and OC-38 --- .../cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/lwjgl/image') diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java index 289ab03..faf3e13 100644 --- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java +++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java @@ -24,13 +24,15 @@ public final class ImageLoader { private ImageLoader() { } + private final HashMap imageHashMap = new HashMap<>(); private final HashMap svgHashMap = new HashMap<>(); public static ImageLoader INSTANCE = new ImageLoader(); /** * Loads an image from resources. - * @param vg The NanoVG context. + * + * @param vg The NanoVG context. * @param fileName The name of the file to load. * @return Whether the image was loaded successfully. */ @@ -58,10 +60,11 @@ public final class ImageLoader { /** * Loads an SVG from resources. - * @param vg The NanoVG context. + * + * @param vg The NanoVG context. * @param fileName The name of the file to load. - * @param width The width of the SVG. - * @param height The height of the SVG. + * @param width The width of the SVG. + * @param height The height of the SVG. * @return Whether the SVG was loaded successfully. */ public boolean loadSVG(long vg, String fileName, float width, float height) { @@ -121,9 +124,8 @@ public final class ImageLoader { * Remove an image from the cache, allowing the image to be garbage collected. * Should be used when the GUI rendering the image is closed. * - * @param vg The NanoVG context. + * @param vg The NanoVG context. * @param fileName The name of the file to remove. - * * @see ImageLoader#loadImage(long, String) */ public void removeImage(long vg, String fileName) { @@ -162,9 +164,8 @@ public final class ImageLoader { * Remove a SVG from the cache, allowing the SVG to be garbage collected. * Should be used when the GUI rendering the SVG is closed. * - * @param vg The NanoVG context. + * @param vg The NanoVG context. * @param fileName The name of the file to remove. - * * @see ImageLoader#loadSVG(long, String, float, float) */ public void removeSVG(long vg, String fileName, float width, float height) { -- cgit