The Artima Developer Community
Sponsored Link

Java Buzz Forum
DoubleBuffering-J2ME

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Fred Grott

Posts: 4361
Nickname: shareme
Registered: Jan, 2003

Fred Grott is Lead Developer-CEO of ShareMe Technologies LLC -The Mobile Future
DoubleBuffering-J2ME Posted: Aug 8, 2003 2:33 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Fred Grott.
Original Post: DoubleBuffering-J2ME
Feed Title: ShareMe Technologies-The Mobile Future
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: A Weblog about Java programming and digital convergence on mobile devices in such areas as P2P and collaborative technology. Old Archive .
Latest Java Buzz Posts
Latest Java Buzz Posts by Fred Grott
Latest Posts From ShareMe Technologies-The Mobile Future

Advertisement
Hmm, it seems I promised some snippets of code this week to show examples of stuff I am coding. Okay here is small snippet of DoubleBuffering fromt he paint and paintScreen mthods:

public void paint(Graphics g){

Cache.imageBuffer = image;
if (Cache.doubleBuffered!=true){
Cache.gc = Cache.imageBuffer.getGraphics();
paintScreen(Cache.gc);
}else{
paintScreen(g);
}
}

public void paintScreen(Graphics g){
g.setClip(x, y, width, height):
g.drawImage(Cache.imageBuffer, x-frame*width, y, Graphics.TOP | Graphics.LEFT):
g.setClip(0, 0, SplashCanvas.getMeWidth(), SplashCanvas.getMeHeight());

}

There is a little more detail than this but you get the general idea. In other area of your class you are first setting the Cache.ImageBuffer to the image and checking for isDoubleBuffered and using those if statements to either use the paintScreen(g) or paintScreen(gc) after you set gc with gc=ImageBuffer.getGraphics().

Read: DoubleBuffering-J2ME

Topic: Profile of  one Java Freakign Idiot Previous Topic   Next Topic Topic: Eclipse Plugin for WEB App UIs!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use