HP Visualize J282 hp workstations - hp-ux 10.20 graphics administration guide - Page 66
Y Pixel Address MOD 2, if green > 0xff green = 0xff
View all HP Visualize J282 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 66 highlights
y_dither_table = Yp % 2; /* Y Pixel Address MOD 2 */ /* Start with the initial values as supplied by the calling routine */ red = RedValue; green = GreenValue; blue = BlueValue; /* Generate the red dither value */ if (red >= 48) /* 48 is a constant required by this routine */ red=red-16; else red=red/2+8; red += dither_red[y_dither_table][x_dither_table]; /* Check for overflow or underflow on red value */ if (red > 0xff) red = 0xff; if (red < 0x00) red = 0x00; /* Generate the green dither value */ if (green >= 48) /* 48 is a constant required by this routine */ green=green-16; else green=green/2+8; green += dither_green[y_dither_table][x_dither_table]; /* Check for overflow or underflow on green value */ if (green > 0xff) green = 0xff; if (green < 0x00) green = 0x00; /* Generate the blue dither value */ if (blue >= 112) /* 112 is a constant required by this routine */ blue=blue-32; else blue=blue/2+24; blue += (dither_blue[y_dither_table][x_dither_table]> 3) | ((blue & 0xC0) >> 6)); return(pixel); } Page 66 Graphics Administration Guide for HP-UX 10.20