Lines Matching refs:pixels
174 int npixels; /* number of pixels allocated R/W */
175 int first_index; /* first index of pixels to use */
178 unsigned long *pixels; /* array of colormap pixels */
204 * Then insure that the pixels we were allocated are given in
206 * that our allocation includes a subset of contiguous pixels at least
210 * 2) We have a contiguous sequence of pixels, monotonically
221 if ((pixels = calloc((unsigned) vinfo->colormap_size,
225 if ((npixels = ROmap(dpy, colormap->colormap, pixels,
227 free(pixels);
231 qsort((char *) pixels, npixels, sizeof(unsigned long), compare);
233 if (!contiguous(pixels, npixels, ncolors, delta, &first_index, &remainder))
236 XFreeColors(dpy, colormap->colormap, pixels, npixels,
238 free(pixels);
241 colormap->base_pixel = pixels[first_index];
254 if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color,
267 if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color,
280 if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color,
293 if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color,
310 if (! ROorRWcell(dpy, colormap->colormap, pixels, npixels, &color,
322 XFreeColors(dpy, colormap->colormap, pixels, first_index,
326 &(pixels[first_index + ncolors]), remainder,
329 free(pixels);
336 ROmap(Display *dpy, Colormap cmap, unsigned long pixels[], int m, int n)
340 * pixels - returns pixel allocations
349 (unsigned) 0, pixels, (unsigned) m))
359 (unsigned) 0, pixels, (unsigned) p)) {
363 XFreeColors(dpy, cmap, pixels, p, (unsigned long) 0);
376 contiguous(unsigned long pixels[], int npixels, int ncolors,
378 /* pixels - specifies allocated pixels
379 * npixels - specifies count of alloc'd pixels
381 * delta - between pixels
397 if (pixels[i-1] + delta == pixels[i])
414 ROorRWcell(Display *dpy, Colormap cmap, unsigned long pixels[],
442 free_cells(dpy, cmap, pixels, npixels, (int)p);
451 free_cells(Display *dpy, Colormap cmap, unsigned long pixels[],
454 * pixels - to be freed
460 * First free the pixels preceding p, and there are p of them;
461 * then free the pixels following p, there are npixels - p - 1 of them.
463 XFreeColors(dpy, cmap, pixels, p, (unsigned long) 0);
464 XFreeColors(dpy, cmap, &(pixels[p+1]), npixels - p - 1, (unsigned long) 0);
465 free(pixels);