Create Unroll Amount Array( ) Java Help

Create Unroll Amount Array( ) 

Each consecutive cell frame in this transition unrolls the roll onto ‘he applet a little bit less than ‘he previous cell frame. The create Unroll Amount Array() static method is used to calculate an array that indicates how much each cell frame should unroll the roll.

init( )

The init< Method lor this transition star Is Like all other transitions, with a call to the base class- init() method. Then the location variable is initialized to an index past the last pix”: in a pixel array. This is followed by copying. all of the old billboard’s pixels into the work_pixels array. An array that stores the number of pixels to unroll each frame is pulled out of the object jable for an applet of this height. If it docs not exist in the hash table, it is created and stored in the object_table.

Then the init( ) method loops through each cell, moving the roll upward by subtracting from the location variable and drawing each cell frame. It makes the current thread take a break before and after the processor-intensive cell frame creation, to allow other threads in Java’s multitasking environment to execute. After the cell frame is created from the work_pixels array with the call to the create Cell From Work Pixels() method, the area the roll was on is drawn over with pixels from the new image. This prepares the work_pixels array for the next cell frame.

JavaHelpOnline.com

  • Feel free to send us an inquiry, we will reply back in hours.
 

Verification

Posted on September 18, 2014 in The Dynamic Billboard Applet

Share the Story

About the Author

Back to Top
Share This