Ignore:
Timestamp:
Apr 20, 2011, 12:39:27 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: use vec2i for image::size and unroll all necessary changes
everywhere else in the code.

File:
1 edited

Legend:

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

    r494 r512  
    1111#include "config.h"
    1212
     13#include "common.h"
     14
    1315#include "image.h"
    1416#include "macs.h"
     
    8486  CONDITION(im,"null image passed in filter::apply\n");
    8587  im->lock();
    86   for (y=im->height()-1; y>=0; y--)
     88  for (y=im->Size().y-1; y>=0; y--)
    8789  {
    8890    c=im->scan_line(y);
    89     for (x=im->width()-1; x>=0; x--)
     91    for (x=im->Size().x-1; x>=0; x--)
    9092    {
    9193      CONDITION((unsigned) c[x]<nc,"not enough filter colors");
     
    179181{
    180182    short cx1, cy1, cx2, cy2, x1 = 0, y1 = 0,
    181           x2 = im->width() - 1, y2 = im->height() - 1;
     183          x2 = im->Size().x - 1, y2 = im->Size().y - 1;
    182184    screen->get_clip(cx1,cy1,cx2,cy2);
    183185
Note: See TracChangeset for help on using the changeset viewer.