feat(renderer): standardize background transparency across pattern renderers
This commit is contained in:
@@ -66,7 +66,7 @@ public class AsciiPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 2 : 1), (int) ((thickBorder ? 3 : 2) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 240);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ChroniclePatternRenderer implements PatternRenderer {
|
||||
final int s2 = s * 2;
|
||||
final int arc = Math.max(12, (int) (18 * scaleFactor));
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 210);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
final Object aaOld = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
|
||||
try {
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
@@ -83,7 +83,7 @@ public class ContemporaryPatternRenderer implements PatternRenderer {
|
||||
final Object aaOld = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
|
||||
try {
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 185);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
g2d.setColor(bg);
|
||||
g2d.fillRoundRect(x, y, width, height, arc, arc);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DreamPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 160);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class FantasyPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max(2, (int) (3 * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 175);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class MetroPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 175);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
|
||||
this.drawDecorativeBorderFilled(g2d, x, y, width, height, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBordersMain(g2d, x + s, y + s, width - s2, height - s2, s, false, outerBorderColor);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ModernPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 3 : 2), (int) ((thickBorder ? 5 : 3) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 210);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SpacecraftPatternRenderer implements PatternRenderer {
|
||||
public void drawWindowPanel(final Graphics2D g2d, final int x, final int y, final int width, final int height, final boolean thickBorder, final Color innerBorderColor, final Color outerBorderColor, final Color backgroundColor, final double scaleFactor) {
|
||||
final var strength = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
|
||||
final var strength2 = strength * 2;
|
||||
final var backgroundTransparency = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 180);
|
||||
final var backgroundTransparency = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
|
||||
drawDecorativeBorderFilled(g2d, x + strength, y + strength, width - strength2, height - strength2, strength, innerBorderColor, backgroundTransparency);
|
||||
drawDecorativeBorder(g2d, x, y, width, height, strength, outerBorderColor);
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SteampunkPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 190);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TerminalPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 2 : 1), (int) ((thickBorder ? 3 : 2) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 230);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class UrbanPatternRenderer implements PatternRenderer {
|
||||
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
|
||||
final var s2 = s * 2;
|
||||
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 190);
|
||||
final var bg = new Color(backgroundColor.getRed(), backgroundColor.getGreen(), backgroundColor.getBlue(), 200);
|
||||
this.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
|
||||
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user