The Column Transition class Changes one image into another by drawing increasingly large columns of the new image onto. the old image. The column sizes increase to the left, and the same pixels are always.drawn on the left side of each column. This makes • the billboard appear to be sliding in from behind the old billboard through vertical , slots in the-current billboard.

To create the cells for this transition, the billboard space is split up into a number of columns, each column pixels wide. Each of the seven image cells the transition will create will have pixels on the left side of each column from the old image and pixels on the right side from the new image. The first cell that is created only starts out with the three right pixels in each column’ taken from the new image -.With each successive cell, three more pixels are filled in from the new. image. TIle last cell has only the three left pixels in each column’ from the old image. Because the width of the qlgc space is most likely not perfectly divisible by 24, there will be some remaining pixels remaining on the right side of the image. These pixels are accounted for-in each cell with the rightmost_coJumns_max_width and rightmost columns_start variables.

init( )

The init() function-starts by calling the base class init() method to initialize the variables contained within this base class, It goes on to initialize the variables , associated with the rightmost column and then copies all of the pixels from. the current billboard into the work pixels. The loop that follows creates all of the cell frames. The next Cell( ) method changes work_piXclsJ and the method inherited from the’ Bm Transition class, create Cell From Work Pixels(), is used to convert these pixels into an image. Because the process of creating the cells can be very demanding on the CPU, Robert tells the thread to sleep occasionally to allow other threads to run.

[vfb id=1]

Share This