diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-06-05 10:36:43 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-06-05 10:36:43 +0100 |
commit | 087f5404658a1543834f16a89e3436f8399297f6 (patch) | |
tree | 4b6d18abbc2e6f3083e664786dbbef98bb142a33 /src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java | |
parent | 3e472ea407d128de61820fc167e08b8fe24186c9 (diff) | |
download | OneConfig-087f5404658a1543834f16a89e3436f8399297f6.tar.gz OneConfig-087f5404658a1543834f16a89e3436f8399297f6.tar.bz2 OneConfig-087f5404658a1543834f16a89e3436f8399297f6.zip |
Reformat code and OC-38
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java | 17 |
1 files changed, 9 insertions, 8 deletions
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<String, Integer> imageHashMap = new HashMap<>(); private final HashMap<String, Integer> 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) { |