aboutsummaryrefslogtreecommitdiff
path: root/modules/pdp_cmap.c
diff options
context:
space:
mode:
authorN.N. <sevyves@users.sourceforge.net>2004-03-30 01:56:16 +0000
committerN.N. <sevyves@users.sourceforge.net>2004-03-30 01:56:16 +0000
commite166e8943388389bb4fc2927aac8758387c42846 (patch)
treed9351d0484d9e3711f19dca2f96f7f5b330eea58 /modules/pdp_cmap.c
parenta8c70748c00a7db45beb156cdd1dc31a96f04c28 (diff)
PiDiP 0.12.13
svn path=/trunk/externals/pidip/; revision=1508
Diffstat (limited to 'modules/pdp_cmap.c')
-rw-r--r--modules/pdp_cmap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/pdp_cmap.c b/modules/pdp_cmap.c
index ae2f516..547208d 100644
--- a/modules/pdp_cmap.c
+++ b/modules/pdp_cmap.c
@@ -22,6 +22,7 @@
*/
#include "pdp.h"
+#include "g_canvas.h"
#include "yuv.h"
#include <math.h>
#include <stdio.h>
@@ -118,7 +119,7 @@ static void pdp_cmap_r(t_pdp_cmap *x, t_floatarg fr )
x->x_colors[x->x_current].y = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7;
x->x_colors[x->x_current].u = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
x->x_colors[x->x_current].v = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
- pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
+ if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
}
}
@@ -130,7 +131,7 @@ static void pdp_cmap_g(t_pdp_cmap *x, t_floatarg fg )
x->x_colors[x->x_current].y = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7;
x->x_colors[x->x_current].u = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
x->x_colors[x->x_current].v = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
- pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
+ if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
}
}
@@ -142,7 +143,7 @@ static void pdp_cmap_b(t_pdp_cmap *x, t_floatarg fb )
x->x_colors[x->x_current].y = (yuv_RGBtoY( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB ))<<7;
x->x_colors[x->x_current].u = (yuv_RGBtoU( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
x->x_colors[x->x_current].v = (yuv_RGBtoV( (x->x_colorR << 16) + (x->x_colorG << 8) + x->x_colorB )-128)<<8;
- pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
+ if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
}
}
@@ -280,7 +281,7 @@ static void pdp_cmap_pick(t_pdp_cmap *x)
x->x_colorR = yuv_YUVtoR( y, u, v );
x->x_colorG = yuv_YUVtoG( y, u, v );
x->x_colorB = yuv_YUVtoB( y, u, v );
- pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
+ if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB );
x->x_colors[x->x_current].y = 255;
x->x_colors[x->x_current].u = 255;
x->x_colors[x->x_current].v = 255;