for (int y = visibleRect.y; y < visibleRect.y + visibleRect.height; y += imgHeight) { for (int x = visibleRect.x; x < visibleRect.x + visibleRect.width; x += imgWidth) {
g.drawImage(backgroundImage, x, y, null);
}
}
}
/** *Drawsasmallchestliketilepatternonaspecifiedarea. * *@paramg2dThegraphicsobjectusedfordrawing. *@paramxThex-coordinateofthetop-leftcorner. *@paramyThey-coordinateofthetop-leftcorner. *@paramwidthThewidthoftheareatodrawthepattern. *@paramheightTheheightoftheareatodrawthepattern. *@paramtransparentOverlayWhethertoaddatransparentoverlayontopof *thepattern.
*/ publicstaticvoid drawSmallChestTilePattern(Graphics2D g2d, int x, int y, int width, int height, boolean transparentOverlay) { int tileSize = width / 2;
try { for (int row = 0; row < 2; row++) { for (int col = 0; col < 2; col++) { if ((row + col) % 2 == 0) {
g2d.setColor(Color.LIGHT_GRAY);
} else {
g2d.setColor(Color.WHITE);
}
g2d.fillRect(x + col * tileSize, y + row * tileSize, tileSize, tileSize);
}
}
if (transparentOverlay) {
g2d.setColor(new Color(0, 0, 0, 128)); // Semi-transparent black overlay (50% opacity)
g2d.fillRect(x, y, width, height);
}
} finally {
g2d.dispose();
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.