new AlphaComposite.ScrOut -> unwanted side effect
In the code below, I draw a 'node' (= Ellipse2D.Float) by drawing its outline and filling it in with colour, and then draw 'link's (= Line2D.Float) between certain nodes. When I change the Graphics2D composite to be SrcOut (so only non-intersecting pixels are drawn), the colour of my nodes becomes black. This makes no sense to me, since the colour value I look up is either blue or pink. Any suggestions as to why this happens?
580publicvoid renderNodes(Graphics2D g2d){
581 g2d.setComposite(AlphaComposite.SrcOut);
582for (int i = 0; i < spitwebSize; i++){
583// Fill node with its 'colour' value
584 g2d.setColor(colour[i]);
585 g2d.fill(node[i]);
586// Draw black outline of node
587 g2d.setColor(Color.black);
588 g2d.draw(node[i]);
589// Draw the name
590 g2d.setColor(Color.black);
591 g2d.drawString(name[i], node[i].x - 15, node[i].y - 10);
592// Draw the links
593for (int j = 0; j < link[i].length; j++){
594g2d.draw(link[i][j]);
595}
596}
Addendum: Apologies for double posting, but I feel I'm more likely to get an answer in the Swing forum section rather than the Fundamentals section.

