×

Discussion Board

Results 1 to 3 of 3

Thread: Snapshot

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    5

    Question Snapshot

    Hi,
    I am trying to take a snapshot of my canvas (not from the camera). Do you know how can I do this?

    Thank you

    Rafael Barbosa

  2. #2
    Registered User
    Join Date
    Apr 2004
    Location
    The Netherlands
    Posts
    17
    I gues you extended Canvas and implemented the paint() method?

    You can add a method to your class which calls the paint() method and passes it a Graphics reference from an Image.

    See code below:

    Code:
    public Image getScreenShot() {
      Image screenshot = Image.createImage(getWidth(), getHeight());
      Graphics g = screenshot.getGraphics();
      paint(g);
      return Image.createImage(screenshot);
    }

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    5

    Another question

    Ok, thank you so much. I have another question. I am trying to serialize an Object3D like a Node or a VertexBuffer (m3g - jsr 184). Do you know how can I do this?

    Thank you again.

    Rafael Barbosa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×