Can I use

  (Graphics2D) getGraphics()

instead of

  getGraphics2D()

when drawing Java2D graphics on a Canvas3D? Performance is very bad when
using the J3DGraphics2D object returned by getGraphics2D. Using getGraphics
and the Graphics2D cast work fine and runs fast. It seams like that the type
of code below work great. Is it ok to do it that way? If not, why?


import java.awt.Graphics2D;
.
.
.
public MyCanvas3D extends Canvas3D {
  .
  .
  .
  public void postSwap() {
    Graphics2D g2d = (Graphics2D) getGraphics();
    /*
     Use g2d in order to draw Java2D graphics on the canvas.
    */
  }
  .
  .
  .
}


Anders

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to