#Chess: Graphics drawing multiple transparent shapes ontop of board
13 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @flint saddle! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, g.getColor().getAlpha() / 255f));
g.fillRect((col * pieceSize) + (pieceSize / 3), (row * pieceSize) + (pieceSize / 3), pieceSize / 3, pieceSize / 3);
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f));
in a loop
Most likely there is something else in the loop
nope just that
it may help to know that it works fine if tje background is an image, but when it's drawn manually with fillrect this happens
oh wait no there is also
Color color = new Color(0, 0, 0, 25);
g.setColor(color);```
before the code i sent
Okay. I believe there is more, but I'm not the one with the code in front of me that I could just copy/paste so that any willing person could try it.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.