Ignore:
Timestamp:
Apr 20, 2011, 9:02:21 PM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: image::Pixel and image::PutPixel? now use vec2i arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/timage.cpp

    r513 r515  
    4040  image *im=new image(vec2i(w,h));
    4141
    42   im->lock();
     42  im->Lock();
    4343  uint8_t *d=im->scan_line(0),*dp=data,*dline;
    4444  int y,x;
     
    6464    d=im->next_line(y,d);
    6565  }
    66   im->unlock();
     66  im->Unlock();
    6767  return im;
    6868}
     
    7575  h=im->Size().y;
    7676
    77   im->lock();
     77  im->Lock();
    7878
    7979  // first we must find out how much data to allocate
     
    134134    }
    135135  }
    136   im->unlock();
     136  im->Unlock();
    137137}
    138138
     
    165165
    166166  // now slam this list of runs to the screen
    167   screen->lock();
     167  screen->Lock();
    168168  uint8_t *screen_line=screen->scan_line(y)+x;
    169169
     
    199199    if (x+ix>x2)                      // clipped totally on the right?
    200200        {
    201           screen->unlock();
     201          screen->Unlock();
    202202          return ;                        // we are done, return!
    203203        }
     
    205205    {
    206206      memcpy(screen_line,datap,(x+ix+run_length-1)-x2);   // slam what we can
    207           screen->unlock();
     207          screen->Unlock();
    208208      return ;    // and return 'cause we are done with the line
    209209        } else
     
    217217    }
    218218  }
    219   screen->unlock();
     219  screen->Unlock();
    220220}
    221221
     
    273273  if (!datap) return ;     // if clip_y says nothing to draw, return
    274274
    275   screen->lock();
     275  screen->Lock();
    276276
    277277  screen_line=screen->scan_line(y)+x;
     
    335335    screen_line+=sw;
    336336  }
    337   screen->unlock();
     337  screen->Unlock();
    338338}
    339339
     
    344344  uint8_t skip,*datap=data;
    345345
    346   screen->lock();
     346  screen->Lock();
    347347  screen_skip = screen->Size().x - w;
    348348  for (; ysteps; ysteps--)
     
    374374    s_off+=screen_skip;
    375375  }
    376   screen->unlock();
     376  screen->Unlock();
    377377}
    378378
     
    386386  if (!datap) return ;     // if clip_y says nothing to draw, return
    387387
    388   screen->lock();
     388  screen->Lock();
    389389  screen_line=screen->scan_line(y)+x;
    390390  int sw=screen->Size().x;
     
    439439    screen_line+=sw;
    440440  }
    441   screen->unlock();
     441  screen->Unlock();
    442442}
    443443
     
    451451  if (!datap) return ;     // if clip_y says nothing to draw, return
    452452
    453   screen->lock();
     453  screen->Lock();
    454454  screen_line=screen->scan_line(y)+x;
    455455  int sw=screen->Size().x;
     
    515515    screen_line+=sw;
    516516  }
    517   screen->unlock();
     517  screen->Unlock();
    518518}
    519519
     
    529529  if (!datap) return ;     // if clip_y says nothing to draw, return
    530530
    531   screen->lock();
     531  screen->Lock();
    532532  screen_line=screen->scan_line(y)+x;
    533533  int sw=screen->Size().x;
     
    593593    screen_line+=sw;
    594594  }
    595   screen->unlock();
     595  screen->Unlock();
    596596}
    597597
     
    614614
    615615  long fixmul=(frame_on<<16)/total_frames;
    616   screen->lock();
     616  screen->Lock();
    617617  for (; ysteps>0; ysteps--,y++)
    618618  {
     
    685685    }
    686686  }
    687   screen->unlock();
     687  screen->Unlock();
    688688}
    689689
     
    704704  if (!datap) return ;
    705705
    706   screen->lock();
     706  screen->Lock();
    707707  uint8_t *screen_run,*paddr=(uint8_t *)pal->addr(),
    708708                *caddr1,*caddr2,r_dest,g_dest,b_dest;
     
    779779    }
    780780  }
    781   screen->unlock();
     781  screen->Unlock();
    782782}
    783783
     
    792792  if (!datap) return ;
    793793
    794   screen->lock();
     794  screen->Lock();
    795795  for (; ysteps>0; ysteps--,y++)
    796796  {
     
    842842    }
    843843  }
    844   screen->unlock();
     844  screen->Unlock();
    845845}
    846846
     
    863863  blend_amount=16-blend_amount;
    864864
    865   screen->lock();
     865  screen->Lock();
    866866  for (; ysteps>0; ysteps--,y++)
    867867  {
     
    946946  }
    947947
    948   screen->unlock();
     948  screen->Unlock();
    949949}
    950950
     
    979979  }*/
    980980
    981   screen->lock();
     981  screen->Lock();
    982982  screen_line=screen->scan_line(y)+x;
    983983  int sw=screen->Size().x;
     
    10321032    screen_line+=sw;
    10331033  }
    1034   screen->unlock();
     1034  screen->Unlock();
    10351035}
    10361036
Note: See TracChangeset for help on using the changeset viewer.