Unroll( ) 

The Unroll ) method modifies the work pixels array for the next cell. It draws the roll onto the work pixels. This method first calculates the offset that it needs to use for drawing each-line of the roll. It then loops through each line of the roll, copying scan lines, from the new image onto the work_pixels array. The pixels that are exposed due to the left offset of each line are filled in with pixels from the static fill pixels array. Another loop then increments though each pixel on the top and the bottom lines of the roll, brightening pixels on the top line and darkening pixels on the bottom line.

Dynamic Code

Robert has shown us how to create interactive high-performance graphics by working around many of the apparent limitations in Java. He shows how to use Systcm.arraycopyf) to effectively shuffle pixel data around. He shows how to properly 'use cooperative multithreading to do computation and network transfers in the background while the user isn't waiting. He also shows us how to dynamically load class files without incurring the initial "gray box wait" syndrome often associated with Java applets. Robert proves that high-performance direct pixel manipulation algorithms can be-efficiently written in Java if you arc careful .In addition to containing interesting code, Dynamicllillboard is a vcry compelling applet fornonprogrammers and users alike.Tt is easily configured by HTML editors, extensible by Java programmers, and entertaining to web users. In this age of advertising rates being driven by "dick-through," where advertisers only want to pay for transfers from a content site to their site, Robert's applet can be used to increase traffic and ultimately increase revenue.

Share This