Changeset 2787 for libpipi


Ignore:
Timestamp:
Aug 28, 2008, 3:11:25 PM (12 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Factorized some code and added temporary debug stuff
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/paint/line.c

    r2778 r2787  
    281281#undef  PLOT
    282282#define PLOT(x, y, c)  \
    283     s->buf_f[(((int)(x)*4))+((int)(y))*(img->w*4)] = \
    284         (c*s->colorf[0]) + (1-c) * s->buf_f[(((int)(x)*4))+((int)(y))*(img->w*4)]; \
    285     s->buf_f[(1+((int)(x)*4))+((int)(y))*(img->w*4)] = \
    286         (c*s->colorf[1]) + (1-c) * s->buf_f[(1+((int)(x)*4))+((int)(y))*(img->w*4)]; \
    287     s->buf_f[(2+((int)(x)*4))+((int)(y))*(img->w*4)] = \
    288         (c*s->colorf[2]) + (1-c) * s->buf_f[(2+((int)(x)*4))+((int)(y))*(img->w*4)];
     283    { int qwer = (((int)(x)*4))+((int)(y))*(img->w*4);\
     284      int qweg = (1+((int)(x)*4))+((int)(y))*(img->w*4); \
     285      int qweb = (2+((int)(x)*4))+((int)(y))*(img->w*4); \
     286    s->buf_f[qwer] = (c*s->colorf[0]) + (1-c) * s->buf_f[qwer]; \
     287    s->buf_f[qweg] = (c*s->colorf[1]) + (1-c) * s->buf_f[qweg]; \
     288    s->buf_f[qweb] = (c*s->colorf[2]) + (1-c) * s->buf_f[qweb]; \
     289    if(s->buf_f[qwer] > 0.8f) s->buf_f[qwer] = 0.8f;   /* DEBUG LOL !*/ \
     290    if(s->buf_f[qwer] < 0.2f) s->buf_f[qwer] = 0.2f; \
     291    if(s->buf_f[qweg] > 0.8f) s->buf_f[qweg] = 0.8f; \
     292    if(s->buf_f[qweg] < 0.2f) s->buf_f[qweg] = 0.2f; \
     293    if(s->buf_f[qweb] > 0.8f) s->buf_f[qweb] = 0.8f; \
     294    if(s->buf_f[qweb] < 0.2f) s->buf_f[qweb] = 0.2f; \
     295  }
    289296#include "aline_template.h"
    290297}
Note: See TracChangeset for help on using the changeset viewer.