• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/tcl-102/tk/tk/generic/

Lines Matching refs:cdata

1118 #define GetRValue(rgb)	((rgb & cdata->red_mask) >> cdata->red_shift)
1119 #define GetGValue(rgb) ((rgb & cdata->green_mask) >> cdata->green_shift)
1120 #define GetBValue(rgb) ((rgb & cdata->blue_mask) >> cdata->blue_shift)
1127 TkColormapData *cdata, /* Colormap data */
1139 TkColormapData *cdata, /* Colormap data */
1144 if (cdata->separated) {
1149 *red = cdata->colors[r].red / 65535.0;
1150 *green = cdata->colors[g].green / 65535.0;
1151 *blue = cdata->colors[b].blue / 65535.0;
1153 *red = cdata->colors[pixel].red / 65535.0;
1154 *green = cdata->colors[pixel].green / 65535.0;
1155 *blue = cdata->colors[pixel].blue / 65535.0;
1200 TkColormapData cdata;
1215 cdata.colors = (XColor *) ckalloc(sizeof(XColor) * ncolors);
1216 cdata.ncolors = ncolors;
1219 cdata.separated = 1;
1220 cdata.red_mask = visual->red_mask;
1221 cdata.green_mask = visual->green_mask;
1222 cdata.blue_mask = visual->blue_mask;
1223 cdata.red_shift = 0;
1224 cdata.green_shift = 0;
1225 cdata.blue_shift = 0;
1227 while ((0x0001 & (cdata.red_mask >> cdata.red_shift)) == 0) {
1228 cdata.red_shift ++;
1230 while ((0x0001 & (cdata.green_mask >> cdata.green_shift)) == 0) {
1231 cdata.green_shift ++;
1233 while ((0x0001 & (cdata.blue_mask >> cdata.blue_shift)) == 0) {
1234 cdata.blue_shift ++;
1238 cdata.colors[i].pixel =
1239 ((i << cdata.red_shift) & cdata.red_mask) |
1240 ((i << cdata.green_shift) & cdata.green_mask) |
1241 ((i << cdata.blue_shift) & cdata.blue_mask);
1244 cdata.separated=0;
1246 cdata.colors[i].pixel = i;
1251 cdata.color = 0;
1253 cdata.color = 1;
1256 XQueryColors(Tk_Display(tkwin), cmap, cdata.colors, ncolors);
1264 if (!cdata.color && level == 2) {
1268 if (!cdata.color && cdata.ncolors == 2) {
1290 ckfree((char *) cdata.colors);
1326 TkImageGetColor(&cdata, XGetPixel(ximage, xx, yy),
1359 TkImageGetColor(&cdata, XGetPixel(ximage, xx, yy),
1378 TkImageGetColor(&cdata, XGetPixel(ximage, xx, yy),
1404 ckfree((char *) cdata.colors);