Lines Matching +defs:point +defs:size
112 " -s <size>/<width>x<height> or --size <size>/<width>x<height>\n"
513 box_t point;
518 point.x1 = floor (x);
519 point.y1 = floor (y);
520 point.x2 = ceil (x);
521 point.y2 = ceil (y);
523 *box = point;
525 if (point.x1 < box->x1) box->x1 = point.x1;
526 if (point.y1 < box->y1) box->y1 = point.y1;
527 if (point.x2 > box->x2) box->x2 = point.x2;
528 if (point.y2 > box->y2) box->y2 = point.y2;
1046 find_last_non_clamped(const CARD16 array[], int size)
1048 for (int i = size - 1; i > 0; i--) {
1060 int size, middle, last_best, last_red, last_green, last_blue;
1071 size = crtc_gamma->size;
1087 last_red = find_last_non_clamped(crtc_gamma->red, size);
1088 last_green = find_last_non_clamped(crtc_gamma->green, size);
1089 last_blue = find_last_non_clamped(crtc_gamma->blue, size);
1104 i1 = (double)(middle + 1) / size;
1106 i2 = (double)(last_best + 1) / size;
1114 if ((last_best + 1) == size)
1119 / 65535) / log((double)((last_red / 2) + 1) / size);
1121 / 65535) / log((double)((last_green / 2) + 1) / size);
1123 / 65535) / log((double)((last_blue / 2) + 1) / size);
1261 /* for --scale-from, figure out the mode size and compute the transform
1416 int i, size;
1433 size = XRRGetCrtcGammaSize(dpy, crtc->crtc.xid);
1435 if (!size) {
1436 fatal("Gamma size is 0.\n");
1442 * is 2^n in size, where 'n' is the number of significant bits in
1443 * the X Color. Because an X Color is 16 bits, size cannot be larger
1446 if (size > 65536) {
1451 crtc_gamma = XRRAllocGamma(size);
1468 for (i = 0; i < size; i++) {
1470 crtc_gamma->red[i] = (double)i / (double)(size - 1) * 65535.0;
1472 crtc_gamma->red[i] = dmin(pow((double)i/(double)(size - 1),
1477 crtc_gamma->green[i] = (double)i / (double)(size - 1) * 65535.0;
1479 crtc_gamma->green[i] = dmin(pow((double)i/(double)(size - 1),
1484 crtc_gamma->blue[i] = (double)i / (double)(size - 1) * 65535.0;
1486 crtc_gamma->blue[i] = dmin(pow((double)i/(double)(size - 1),
1642 /* next reset screen size */
1737 * Set the screen size
2077 /* make sure output fits in specified size */
2104 fatal ("screen cannot be larger than %dx%d (desired size %dx%d)\n",
2666 int size = -1;
2722 if (!strcmp ("-s", argv[i]) || !strcmp ("--size", argv[i])) {
2727 size = check_strtol(argv[i]);
2728 if (size < 0) argerr ("--size argument must be nonnegative\n");
2971 /* check if it's a single floating-point value,
3052 argerr ("failed to parse '%s' as a scale-from size\n", argv[i]);
3097 argerr ("failed to parse '%s' as a framebuffer size\n", argv[i]);
3106 argerr ("failed to parse '%s' as a physical size\n", argv[i]);
3572 * the known physical size
3588 * Compute physical screen size
4049 for (size = 0; size < nsize; size++)
4051 if (sizes[size].width == width && sizes[size].height == height)
4054 if (size >= nsize) {
4060 else if (size < 0)
4061 size = current_size;
4062 else if (size >= nsize) {
4065 size, nsize);
4080 if (size == current_size)
4088 short *rates = XRRConfigRates (sc, size, &nrate);
4094 fprintf (stderr, "Rate %.2f Hz not available for this size\n", rate);
4157 printf("Setting size to %d, rotation to %s\n", size, direction[rot]);
4177 status = XRRSetScreenConfigAndRate (dpy, sc, root, (SizeID) size,
4187 if (verbose && setit && !dryrun && size != current_size) {