Adds the getWidth/getHeight functions and the annotation.
package com.valkryst.VTerminal.font;
import lombok.Getter;
+import lombok.ToString;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
+@ToString
class FontCharacter {
/** The character. */
@Getter private final char character;
@@ -55,4 +57,24 @@ class FontCharacter {
image = op.filter(image, null);
}
+
+ /**
+ * Retrieves the width of the character's image.
+ *
+ * @return
+ * The width of the character's image.
+ */
+ public int getWidth() {
+ return image.getWidth();
+ }
+
+ /**
+ * Retrieves the height of the character's image.
+ *
+ * @return
+ * The height of the character's image.
+ */
+ public int getHeight() {
+ return image.getHeight();
+ }
}
