Changeset 858 for trunk/macosx/Torrent.m


Ignore:
Timestamp:
Sep 12, 2006, 12:51:11 AM (16 years ago)
Author:
livings124
Message:

advanced bar doesn't need to generate it's own border

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r857 r858  
    336336
    337337    //left and right borders
    338     p = (uint32_t *) bitmapData;
     338    /*p = (uint32_t *) bitmapData;
    339339    for(h = 0; h < BAR_HEIGHT; h++)
    340340    {
     
    342342        p[width - 1] = kBorder[h];
    343343        p += bytesPerRow / 4;
    344     }
     344    }*/
    345345
    346346    int8_t * pieces = malloc(width);
     
    352352
    353353    //first two lines: dark blue to show progression, green to show available
    354     int end = lrintf(floor([self progress] * (width - 2)));
    355     p = (uint32_t *) (bitmapData) + 1;
     354    int end = lrintf(floor([self progress] * width));
     355    p = (uint32_t *) bitmapData;
    356356
    357357    for (w = 0; w < end; w++)
     
    373373    //lines 2 to 14: blue or grey depending on whether we have the piece or not
    374374    uint32_t color;
    375     for( w = 0; w < width - 2; w++ )
    376     {
    377         //point to pixel ( 2 + w, 2 ). We will then draw "vertically"
    378         p = (uint32_t *) ( bitmapData + 2 * bytesPerRow ) + 1 + w;
    379 
     375    for( w = 0; w < width; w++ )
     376    {
    380377        if (pieces[w] < 0)
    381378            color = kGray;
     
    388385        else
    389386            color = kBlue3;
    390 
     387       
     388        //point to pixel ( w, 2 ) and draw "vertically"
     389        p = (uint32_t *) ( bitmapData + 2 * bytesPerRow ) + w;
    391390        for( h = 2; h < BAR_HEIGHT; h++ )
    392391        {
Note: See TracChangeset for help on using the changeset viewer.