Moin zusammen !
Ich habe ein png-Image mit transparentem Hintergrund welches ich als Splash verwende.
Nun will ich darauf einen Fortschrittsbalken zeichnen. Sobald ich in den transparenten Bereich komme, zeigt er nix an. Was mach ich falsch ?
Besten Dank
asroger
Ich habe ein png-Image mit transparentem Hintergrund welches ich als Splash verwende.
Nun will ich darauf einen Fortschrittsbalken zeichnen. Sobald ich in den transparenten Bereich komme, zeigt er nix an. Was mach ich falsch ?
Java:
public void drawSplashProgress(String msg) {
// clear what we don't need from previous state
graph.setComposite(AlphaComposite.Clear);
graph.fillRect(X, textY, W, TEXT_H);
if (barPos == 0) {
graph.fillRect(X, barY, W, BAR_H);
}
// draw new state
graph.setPaintMode();
// draw message
graph.setColor(Color.BLACK);
graph.drawString(msg, X, textY + TEXT_H);
// draw progress bar
graph.setColor(Color.BLUE);
graph.fillOval(X + barPos * (BAR_H + 1), barY, BAR_H, BAR_H);
// show changes
if (splash.isVisible()) {
splash.update();
barPos = (barPos + 1) % NUM_BUBBLES;
}
}
Besten Dank
asroger