Changeset 518 for abuse/trunk/src/imlib/filter.cpp
- Timestamp:
- Apr 20, 2011, 9:02:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/imlib/filter.cpp
r515 r518 179 179 char transparent) 180 180 { 181 short cx1, cy1, cx2, cy2, x1 = 0, y1 = 0,182 x2 = im->Size().x - 1, y2 = im->Size().y - 1;183 screen-> get_clip(cx1,cy1,cx2,cy2);181 int cx1, cy1, cx2, cy2, x1 = 0, y1 = 0, 182 x2 = im->Size().x, y2 = im->Size().y; 183 screen->GetClip(cx1, cy1, cx2, cy2); 184 184 185 185 // see if the image gets clipped off the screen 186 if(x > cx2 || y > cy2 || x + (x2 - x1) < cx1 || y + (y2 - y1) <cy1)186 if(x >= cx2 || y >= cy2 || x + (x2 - x1) <= cx1 || y + (y2 - y1) <= cy1) 187 187 return; 188 188 … … 198 198 } 199 199 200 if(x + x2 - x1 + 1 >cx2)200 if(x + x2 - x1 >= cx2) 201 201 x2 = cx2 - x + x1; 202 202 203 if(y + y2 - y1 + 1 >cy2)203 if(y + y2 - y1 >= cy2) 204 204 y2 = cy2 - y + y1; 205 205 206 if(x1 > x2 || y1 >y2)206 if(x1 >= x2 || y1 >= y2) 207 207 return; 208 208 209 int xl = x2 - x1 + 1;210 int yl = y2 - y1 + 1;211 212 screen-> add_dirty(x, y, x + xl - 1, y + yl - 1);209 int xl = x2 - x1; 210 int yl = y2 - y1; 211 212 screen->AddDirty(x, y, x + xl, y + yl); 213 213 214 214 screen->Lock();
Note: See TracChangeset
for help on using the changeset viewer.