Lines Matching refs:value

39 /* store a typed value to pointed location */
42 /* load a typed value from pointed location */
56 /* value shifted left by n bits, negative n is allowed */
57 #define LSHIFT(value,n) IFNEGPOS((n),(value)>>-(n),(value)<<(n))
59 /* value shifted right by n bits, negative n is allowed */
60 #define RSHIFT(value,n) IFNEGPOS(n,(value)<<-(n),(value)>>(n))
66 /* extracts the component defined by format->shift[i] and format->mask[i] from a specific-format value */
67 #define UNCONVCOMP(value,format,i) \
68 (RSHIFT((value)&(format)->mask[i],(format)->shift[i]))
73 ditherColor(rgbquad_t value, ImageFormat * format, int row, int col)
75 int blue = QUAD_BLUE(value);
76 int green = QUAD_GREEN(value);
77 int red = QUAD_RED(value);
135 /* convert a single pixel color value from rgbquad according to visual format
139 putRGBADither(rgbquad_t value, void *ptr, ImageFormat * format,
143 value = premultiplyRGBA(value);
146 value = format->colorIndex[ditherColor(value, format, row, col)];
149 value = CONVCOMP(value, format, 0) | CONVCOMP(value, format, 1) |
150 CONVCOMP(value, format, 2) | CONVCOMP(value, format, 3);
156 PUT(byte_t, ptr, value & 0xff);
157 value >>= 8;
160 PUT(byte_t, ptr, value & 0xff);
161 value >>= 8;
164 PUT(byte_t, ptr, value & 0xff);
165 value >>= 8;
168 PUT(byte_t, ptr, value & 0xff);
174 PUT(byte_t, ptr, (value >> 24) & 0xff);
177 PUT(byte_t, ptr, (value >> 16) & 0xff);
180 PUT(byte_t, ptr, (value >> 8) & 0xff);
183 PUT(byte_t, ptr, value & 0xff);
189 PUT(rgbquad_t, ptr, value);
195 PUT(word_t, ptr, value);
198 PUT(byte_t, ptr, value);
204 /* load a single pixel color value and un-convert it to rgbquad according to visual format */
213 /* get the value basing on depth and byte order */
214 rgbquad_t value = 0;
220 value |= GET(byte_t, ptr);
221 value <<= 8;
224 value |= GET(byte_t, ptr);
225 value <<= 8;
228 value |= GET(byte_t, ptr);
229 value <<= 8;
232 value |= GET(byte_t, ptr);
238 value |= (GET(byte_t, ptr) << 24);
241 value |= (GET(byte_t, ptr) << 16);
244 value |= (GET(byte_t, ptr) << 8);
247 value |= GET(byte_t, ptr);
253 value = GET(rgbquad_t, ptr);
259 value = (rgbquad_t) GET(word_t, ptr);
262 value = (rgbquad_t) GET(byte_t, ptr);
267 /* now un-convert the value */
269 if (value == format->transparentColor)
272 return format->colorMap[value];
275 return UNCONVCOMP(value, format, 0) | UNCONVCOMP(value, format, 1) |
276 UNCONVCOMP(value, format, 2) | UNCONVCOMP(value, format, 3) |