feat(renderer): standardize background transparency across pattern renderers

This commit is contained in:
extio-de
2026-02-01 15:13:52 +01:00
parent 706b4f5722
commit fbadfb40ab
11 changed files with 11 additions and 11 deletions

View File

@@ -66,7 +66,7 @@ public class AsciiPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 2 : 1), (int) ((thickBorder ? 3 : 2) * scaleFactor)); final var s = Math.max((thickBorder ? 2 : 1), (int) ((thickBorder ? 3 : 2) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }

View File

@@ -74,7 +74,7 @@ public class ChroniclePatternRenderer implements PatternRenderer {
final int s2 = s * 2; final int s2 = s * 2;
final int arc = Math.max(12, (int) (18 * scaleFactor)); 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); final Object aaOld = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
try { try {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

View File

@@ -83,7 +83,7 @@ public class ContemporaryPatternRenderer implements PatternRenderer {
final Object aaOld = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING); final Object aaOld = g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
try { try {
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 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.setColor(bg);
g2d.fillRoundRect(x, y, width, height, arc, arc); g2d.fillRoundRect(x, y, width, height, arc, arc);

View File

@@ -40,7 +40,7 @@ public class DreamPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor)); final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }

View File

@@ -49,7 +49,7 @@ public class FantasyPatternRenderer implements PatternRenderer {
final var s = Math.max(2, (int) (3 * scaleFactor)); final var s = Math.max(2, (int) (3 * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }

View File

@@ -61,7 +61,7 @@ public class MetroPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor)); final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x, y, width, height, s, innerBorderColor, bg);
this.drawDecorativeBordersMain(g2d, x + s, y + s, width - s2, height - s2, s, false, outerBorderColor); this.drawDecorativeBordersMain(g2d, x + s, y + s, width - s2, height - s2, s, false, outerBorderColor);

View File

@@ -42,7 +42,7 @@ public class ModernPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 3 : 2), (int) ((thickBorder ? 5 : 3) * scaleFactor)); final var s = Math.max((thickBorder ? 3 : 2), (int) ((thickBorder ? 5 : 3) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }

View File

@@ -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) { 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 strength = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
final var strength2 = strength * 2; 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); drawDecorativeBorderFilled(g2d, x + strength, y + strength, width - strength2, height - strength2, strength, innerBorderColor, backgroundTransparency);
drawDecorativeBorder(g2d, x, y, width, height, strength, outerBorderColor); drawDecorativeBorder(g2d, x, y, width, height, strength, outerBorderColor);

View File

@@ -79,7 +79,7 @@ public class SteampunkPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor)); final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }

View File

@@ -71,7 +71,7 @@ public class TerminalPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 2 : 1), (int) ((thickBorder ? 3 : 2) * scaleFactor)); final var s = Math.max((thickBorder ? 2 : 1), (int) ((thickBorder ? 3 : 2) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }

View File

@@ -48,7 +48,7 @@ public class UrbanPatternRenderer implements PatternRenderer {
final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor)); final var s = Math.max((thickBorder ? 4 : 2), (int) ((thickBorder ? 6 : 3) * scaleFactor));
final var s2 = s * 2; 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.drawDecorativeBorderFilled(g2d, x + s, y + s, width - s2, height - s2, s, innerBorderColor, bg);
this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor); this.drawDecorativeBorder(g2d, x, y, width, height, s, outerBorderColor);
} }