Enhance jack icon

This commit is contained in:
Bane Stojkovic
2022-12-20 23:42:57 +01:00
parent 04302866e9
commit 0fcf7e1fd4
@@ -26,6 +26,7 @@ import java.awt.Color;
import java.awt.Composite; import java.awt.Composite;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Shape; import java.awt.Shape;
import java.awt.geom.AffineTransform; import java.awt.geom.AffineTransform;
import java.awt.geom.Area; import java.awt.geom.Area;
@@ -300,7 +301,17 @@ public class ClosedJack1_4 extends AbstractMultiPartComponent<JackType> {
g2d.setColor(METAL_COLOR); g2d.setColor(METAL_COLOR);
g2d.fillRect(width * 7 / 16, height * 6 / 7 + 1, width / 8, height / 7 - 1); g2d.fillRect(width * 7 / 16, height * 6 / 7 + 1, width / 8, height / 7 - 1);
g2d.fillRect(width * 7 / 16, height / 7 + 2, width / 8, height / 7 - 1); g2d.fillRect(width * 7 / 16, height / 7 + 2, width / 8, height / 7 - 1);
g2d.setColor(LABEL_COLOR);
g2d.setFont(LABEL_FONT.deriveFont(width / 3.5f));
RenderingHints rh = new RenderingHints(
RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
g2d.setRenderingHints(rh);
StringUtils.drawCenteredText(g2d, "6.3", width / 2 - 1, height / 2, HorizontalAlignment.CENTER, VerticalAlignment.CENTER);
} }
@Override @Override