Hi
I have tried the code you mentioned but i can't snap the frame with my 3D
world on it is always snaps the right upper corner. In the code below the
topLeftX and topLeftY are the coordinates of the topleft corner of the
window frame containing the app. And the wide and heigth are the wide and
heigth of the frame.
In the attachement is a generated pic. I hope someone can help me

code:
 public void postSwap()
 {
  if(writeJPEG_)
  {
   System.out.println("Writing JPEG");
   GraphicsContext3D  ctx = getGraphicsContext3D();
// The raster components need all be set!
   Raster ras = new Raster(
    new Point3f(-1.0f,-1.0f,-1.0f),
   Raster.RASTER_COLOR,
    topLeftX, topLeftY,
    width, heigth,
    new ImageComponent2D(
      ImageComponent.FORMAT_RGB,
//      new BufferedImage(512,512,
new BufferedImage(width,heigth,
      BufferedImage.TYPE_INT_RGB)),
    null);
   ctx.readRaster(ras);

// Now strip out the image info
   BufferedImage img = ras.getImage().getImage();

----- Original Message -----
From: Oliver Radfelder <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 9:39 AM
Subject: Re: [JAVA3D] screen capture


> have a look at the faq at j3d.org
>
> http://www.j3d.org/faq/capturing.html
>
>
> Oliver
>
>
===========================================================================
> 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".

<<attachment: Capture0.jpg>>

Reply via email to