aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/lwjgl
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-06-05 10:36:43 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-06-05 10:36:43 +0100
commit087f5404658a1543834f16a89e3436f8399297f6 (patch)
tree4b6d18abbc2e6f3083e664786dbbef98bb142a33 /src/main/java/cc/polyfrost/oneconfig/lwjgl
parent3e472ea407d128de61820fc167e08b8fe24186c9 (diff)
downloadOneConfig-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')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/lwjgl/image/ImageLoader.java17
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/lwjgl/scissor/ScissorManager.java13
2 files changed, 17 insertions, 13 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) {
diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/scissor/ScissorManager.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/scissor/ScissorManager.java
index 05747df..159de96 100644
--- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/scissor/ScissorManager.java
+++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/scissor/ScissorManager.java
@@ -12,10 +12,11 @@ public class ScissorManager {
/**
* Adds and applies a scissor rectangle to the list of scissor rectangles.
- * @param vg The NanoVG context.
- * @param x The x coordinate of the scissor rectangle.
- * @param y The y coordinate of the scissor rectangle.
- * @param width The width of the scissor rectangle.
+ *
+ * @param vg The NanoVG context.
+ * @param x The x coordinate of the scissor rectangle.
+ * @param y The y coordinate of the scissor rectangle.
+ * @param width The width of the scissor rectangle.
* @param height The height of the scissor rectangle.
* @return The scissor rectangle.
*/
@@ -29,7 +30,8 @@ public class ScissorManager {
/**
* Resets the scissor rectangle provided.
- * @param vg The NanoVG context.
+ *
+ * @param vg The NanoVG context.
* @param scissor The scissor rectangle to reset.
*/
public static void resetScissor(long vg, Scissor scissor) {
@@ -41,6 +43,7 @@ public class ScissorManager {
/**
* Clear all scissor rectangles.
+ *
* @param vg The NanoVG context.
*/
public static void clearScissors(long vg) {