|
|
@@ -280,12 +280,19 @@ static void draw_antialiased_line_float(pipi_image_t *img, struct line* s) |
|
|
|
/* Is that an horrible mess ? Yes, it is. */ |
|
|
|
#undef PLOT |
|
|
|
#define PLOT(x, y, c) \ |
|
|
|
s->buf_f[(((int)(x)*4))+((int)(y))*(img->w*4)] = \ |
|
|
|
(c*s->colorf[0]) + (1-c) * s->buf_f[(((int)(x)*4))+((int)(y))*(img->w*4)]; \ |
|
|
|
s->buf_f[(1+((int)(x)*4))+((int)(y))*(img->w*4)] = \ |
|
|
|
(c*s->colorf[1]) + (1-c) * s->buf_f[(1+((int)(x)*4))+((int)(y))*(img->w*4)]; \ |
|
|
|
s->buf_f[(2+((int)(x)*4))+((int)(y))*(img->w*4)] = \ |
|
|
|
(c*s->colorf[2]) + (1-c) * s->buf_f[(2+((int)(x)*4))+((int)(y))*(img->w*4)]; |
|
|
|
{ int qwer = (((int)(x)*4))+((int)(y))*(img->w*4);\ |
|
|
|
int qweg = (1+((int)(x)*4))+((int)(y))*(img->w*4); \ |
|
|
|
int qweb = (2+((int)(x)*4))+((int)(y))*(img->w*4); \ |
|
|
|
s->buf_f[qwer] = (c*s->colorf[0]) + (1-c) * s->buf_f[qwer]; \ |
|
|
|
s->buf_f[qweg] = (c*s->colorf[1]) + (1-c) * s->buf_f[qweg]; \ |
|
|
|
s->buf_f[qweb] = (c*s->colorf[2]) + (1-c) * s->buf_f[qweb]; \ |
|
|
|
if(s->buf_f[qwer] > 0.8f) s->buf_f[qwer] = 0.8f; /* DEBUG LOL !*/ \ |
|
|
|
if(s->buf_f[qwer] < 0.2f) s->buf_f[qwer] = 0.2f; \ |
|
|
|
if(s->buf_f[qweg] > 0.8f) s->buf_f[qweg] = 0.8f; \ |
|
|
|
if(s->buf_f[qweg] < 0.2f) s->buf_f[qweg] = 0.2f; \ |
|
|
|
if(s->buf_f[qweb] > 0.8f) s->buf_f[qweb] = 0.8f; \ |
|
|
|
if(s->buf_f[qweb] < 0.2f) s->buf_f[qweb] = 0.2f; \ |
|
|
|
} |
|
|
|
#include "aline_template.h" |
|
|
|
} |
|
|
|
|
|
|
|