Hi,

I'd like to have a canvas3D in a circle or something that is not a rectangle.
The idea I had is to use the "paint" or "postRender" method to draw an image with transparency over the rendered picture but it doesn't work. My code is below. The postRender is always called but the image is not drawn ! I also tried the postSwap but it's not called at all.

What is wrong in my code ? (why isn't the image drawn)
Can I draw pictures with transparency (gif for example) with the "getImage" / "drawImage" methods ?
My code :

public class MyCanvas3D extends javax.media.j3d.Canvas3D {
  Image image;

  MyCanvas3D(java.awt.GraphicsConfiguration graphicsConfiguration, Image image) {
   super(graphicsConfiguration);
   this.image = image;
  }

  public void paint(java.awt.Graphics g) {
   super.paint(g);
   getGraphics2D().drawImage(image, 0, 0, this);
  }

  public void postSwap() {
   getGraphics2D().drawImage(image, 0, 0, this);
  }
}
 



Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en fran�ais !

Reply via email to