ソースを参照

* Factorized some code and added temporary debug stuff

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2787 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
jylam 16年前
コミット
d0e6525dd1
1個のファイルの変更13行の追加6行の削除
  1. +13
    -6
      pipi/paint/line.c

+ 13
- 6
pipi/paint/line.c ファイルの表示

@@ -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"
}



読み込み中…
キャンセル
保存