You Are Here:

Community: Developer Discussion Boards

#1 Old Question Snapshot - 2005-03-08, 22:18

Join Date: Mar 2005
Posts: 5
bgrafael
Offline
Registered User
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
Reply With Quote

#2 Old 2005-03-09, 11:40

Join Date: Apr 2004
Posts: 17
Location: The Netherlands
mkleijer's Avatar
mkleijer
Offline
Registered User
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);
}
Reply With Quote

#3 Old Another question - 2005-03-09, 14:11

Join Date: Mar 2005
Posts: 5
bgrafael
Offline
Registered User
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia