277 |
/* for each row */ |
/* for each row */ |
278 |
for ( y = 0; y < bitmap->rows ; y++ ) |
for ( y = 0; y < bitmap->rows ; y++ ) |
279 |
{ |
{ |
280 |
/* |
/* |
281 |
* Horizontally: |
* Horizontally: |
282 |
* |
* |
283 |
* From the last pixel on, make each pixel or'ed with the |
* From the last pixel on, make each pixel or'ed with the |
310 |
{ |
{ |
311 |
if ( p[x] + p[x - i] > bitmap->num_grays - 1 ) |
if ( p[x] + p[x - i] > bitmap->num_grays - 1 ) |
312 |
{ |
{ |
313 |
p[x] = bitmap->num_grays - 1; |
p[x] = (unsigned char)(bitmap->num_grays - 1); |
314 |
break; |
break; |
315 |
} |
} |
316 |
else |
else |
317 |
{ |
{ |
318 |
p[x] += p[x - i]; |
p[x] = (unsigned char)(p[x] + p[x-i]); |
319 |
if ( p[x] == bitmap->num_grays - 1 ) |
if ( p[x] == bitmap->num_grays - 1 ) |
320 |
break; |
break; |
321 |
} |
} |
326 |
} |
} |
327 |
} |
} |
328 |
|
|
329 |
/* |
/* |
330 |
* Vertically: |
* Vertically: |
331 |
* |
* |
332 |
* Make the above `ystr' rows or'ed with it. |
* Make the above `ystr' rows or'ed with it. |