Lines Matching defs:grayRamp

134     XStandardColormap *grayRamp)
160 if (grayRamp == NULL) grayRamp = &g;
163 grayRamp->colormap = DefaultColormapOfScreen(screen);
164 if (colorCube != NULL) colorCube->colormap = grayRamp->colormap;
167 0, 0, 0, 0, colorCube, grayRamp, True);
176 XStandardColormap *grayRamp,
186 if (grayRamp == NULL) return 0;
188 colorCube->colormap != grayRamp->colormap) return 0;
198 if (grayRamp->colormap == None && drawable == None) return 0;
208 vinfo = PickCorrectVisual(dpy, vinfo, nvis, grayRamp->colormap);
212 if (grays <= 1) grayRamp->red_max = 0;
213 else grayRamp->red_max = grays - 1;
240 if (grayRamp->colormap == None) {
241 grayRamp->colormap = XCreateColormap(dpy, drawable, vinfo->visual,
243 if (colorCube != NULL) colorCube->colormap = grayRamp->colormap;
250 gotRamp = GetGrayRampFromProperty(dpy, vinfo, grayRamp,
257 GetDatabaseValues(dpy, vinfo, colorCube, grayRamp);
273 if (grayRamp->red_max != 0) {
274 AllocateGrayRamp(dpy, vinfo, grayRamp, colorCube, &pixels);
279 XFreeColors(dpy, grayRamp->colormap,
297 if (!gotRamp && grayRamp->red_max != 0) {
298 grayRamp->visualid = vinfo->visualid;
299 grayRamp->killid = p;
300 DefineProperty(dpy, grayRamp, vinfo, propRamp, nPropRamp,
308 if (grayRamp->red_max == 0) {
317 grayRamp->red_max = 1;
318 grayRamp->red_mult = 1;
319 grayRamp->base_pixel = 0;
469 XStandardColormap *grayRamp,
488 if (c->colormap == grayRamp->colormap &&
491 grayRamp->red_max = c->red_max;
492 grayRamp->red_mult = c->red_mult;
493 grayRamp->base_pixel = c->base_pixel;
494 grayRamp->visualid = c->visualid;
495 grayRamp->killid = c->killid;
509 XStandardColormap *grayRamp)
618 if (grayRamp->red_max == 0) {
619 grayRamp->red_max =
622 grayRamp->red_mult = 1;
628 if (CubicCube(colorCube)) UseGrayDiagonal(colorCube, grayRamp);
629 else UseGrayCorners(colorCube, grayRamp);
634 FindStaticGrayRamp(dpy, vinfo, grayRamp, colorCube);
1085 XStandardColormap *grayRamp,
1096 grayRamp->red_max = 0;
1102 XQueryColors(dpy, grayRamp->colormap, ramp, entries);
1119 grayRamp->red_max = 0;
1141 UseGrayDiagonal(colorCube, grayRamp);
1143 grayRamp->red_max = size;
1144 grayRamp->red_mult = redMult;
1145 grayRamp->base_pixel = base;
1289 XStandardColormap *grayRamp,
1294 Colormap cmap = grayRamp->colormap;
1311 if (colorCube->red_max >= grayRamp->red_max) {
1313 UseGrayDiagonal(colorCube, grayRamp);
1319 grayRamp->base_pixel = 0; /* temporary, may change */
1321 count = grayRamp->red_max + 1;
1327 grayRamp->red_max = 0;
1332 if (!AllocateColormap(dpy, grayRamp, vinfo, &count, pixels,
1336 if (CubicCube(colorCube)) UseGrayDiagonal(colorCube, grayRamp);
1337 else UseGrayCorners(colorCube, grayRamp);
1339 grayRamp->red_max = 0;
1344 grayRamp->base_pixel = pixels->pixels[first];
1350 color.red = (unsigned short)((n * SCALE) / (grayRamp->red_max));
1356 grayRamp->red_max = 0;