BitBlt : Java Glossary
home B words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
BitBlt
Bit Block Transfer. It usually refers to copying rectangles of images, either within onscreen images, or from offscreen images to onscreen images most importantly for animation effects or smooth scrolling. The bits to be moved won’t necessarily nicely align on 32-bit boundaries. The GPUs (Graphics Processing Units) inside video cards are specialised for this task. They may have special bitblt instructions to shovel 512 bits around at a pop, shift to deal with any misalignment, and mask to avoid touching surrounding bits. A standard Pentium CPU, in contrast, does bitblts only 32 bits at a time, and has to do the shift and mask as separate operations. The Java VolatileImage class lets you store images inside the video controller’s private non-displaying memory and to manipulate them with its special purpose hardware to blast them onto the screen.

Bitblt is not always associated with animation. Text drawing is usually implemented by having precomposed images of the glyphs in the invisible part of video RAM, and using the GPU to bitblt them to the onscreen part.

Java methods that do bitblts include Graphics.drawImage ( Image sourceImg, int destx1, int desty1, int destx2, int desty2, int sourcex1, int sourcey1, int sourcex2, int sourcey2, ImageObserver observer /* usually this */) for copying between images or between image and screen, and Graphics.copyArea(int x, int y, int width, int height, int dx, int dy) for copying regions within an image or from one place on the screen to another. And finally, to capture the screen an as Image, use java.awt.Robot.createScreenCapture Graphics.drawImage will scale if the source and destination rectangles are not the same size. Graphics.copyArea can’t deal with a partially obscured component. The runtime will schedule a complete repaint in that case. Instead of using the repaint mechanism, you can use Component.getGraphics to handle your animation changes.


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.16] Spread the Net
You are visitor number 9,081.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/bitblt.html J:\mindprod\jgloss\bitblt.html