Lines Matching defs:gamma
50 /* Maximum and Minimum gamma values */
66 " -gamma f.f Gamma Value\n"
70 "If no gamma is specified, returns the current setting\n");
109 XF86VidModeGamma gamma;
132 } else if (isabbreviation ("-gamma", arg, 2)) {
133 if (++i >= argc) Syntax ("-gamma requires an argument");
135 Syntax ("-gamma cannot be used with -rgamma, -ggamma, or -bgamma");
146 if (gam >= 0.0f) Syntax ("cannot set both -gamma and -rgamma");
157 if (gam >= 0.0f) Syntax ("cannot set both -gamma and -ggamma");
168 if (gam >= 0.0f) Syntax ("cannot set both -gamma and -bgamma");
218 if (!XF86VidModeGetGamma(dpy, screen, &gamma)) {
219 fprintf(stderr, "Unable to query gamma correction\n");
223 (double)gamma.red, (double)gamma.green, (double)gamma.blue);
226 gamma.red = gam;
227 gamma.green = gam;
228 gamma.blue = gam;
230 if (rgam >= 0.0f) gamma.red = rgam;
231 if (ggam >= 0.0f) gamma.green = ggam;
232 if (bgam >= 0.0f) gamma.blue = bgam;
234 /* Not changing gamma, all done */
239 /* Change gamma now */
240 if (!XF86VidModeSetGamma(dpy, screen, &gamma)) {
241 fprintf(stderr, "Unable to set gamma correction\n");
243 if (!XF86VidModeGetGamma(dpy, screen, &gamma)) {
244 fprintf(stderr, "Unable to query gamma correction\n");
249 (double)gamma.red, (double)gamma.green,
250 (double)gamma.blue);