1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

how to merge an array of bitmap together in one bitmap ?


Last Updated:

  1. freeaks

    freeaks New Member This Topic's Starter

    Joined:
    Jun 28, 2010
    Messages:
    1
    Likes Received:
    0
    hi there,

    how can i merge together in one single bitmap the content of a bitmap array ?

    here's my render method:

    Code (Text):
    1.  
    2. //here's what i have:
    3. for (int x = 0; x < MapLoader.width; x++) {
    4.   for (int y = 0; y < MapLoader.height; y++) {
    5.     g.drawBitmap( picSource[x][y], posX, posY, BitmapPaint);
    6.   }
    7. }
    8.  
    9. //and here's what i'd like to have:
    10. g.drawBitmap( picDest, posX, posY, BitmapPaint);
    11.  
    i would like to itterate through picSource[x][y] grab all the bitmap and put them all in picDest.
    note that no bitmap contained in the picSource[][] array is located a the same position ..
    there's no bitmap on top of any other, they're just displayed in a grid
    each is a 32x32 bitmap in a 4x3 grid for example..
    each its own spot on the grid ..

    thanks for the help
     

    Advertisement

Share This Page

Loading...