diff options
Diffstat (limited to 'platform/x11/x11_main.c')
-rw-r--r-- | platform/x11/x11_main.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index d3f3d368..908850eb 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -791,6 +791,7 @@ static void usage(void) fprintf(stderr, "\t-b -\tset anti-aliasing quality in bits (0=off, 8=best)\n"); fprintf(stderr, "\t-p -\tpassword\n"); fprintf(stderr, "\t-r -\tresolution\n"); + fprintf(stderr, "\t-C -\tRRGGBB (tint color in hexadecimal syntax)\n"); exit(1); } @@ -811,6 +812,7 @@ int main(int argc, char **argv) struct timeval now; struct timeval *timeout; struct timeval tmo_advance_delay; + int tint, tint_r, tint_g, tint_b; ctx = fz_new_context(NULL, NULL, FZ_STORE_DEFAULT); if (!ctx) @@ -819,10 +821,17 @@ int main(int argc, char **argv) exit(1); } - while ((c = fz_getopt(argc, argv, "p:r:b:")) != -1) + while ((c = fz_getopt(argc, argv, "p:r:b:C:")) != -1) { switch (c) { + case 'C': + c = strtol(fz_optarg, NULL, 16); + tint = 1; + tint_r = (c >> 16) & 255; + tint_g = (c >> 8) & 255; + tint_b = (c) & 255; + break; case 'p': password = fz_optarg; break; case 'r': resolution = atoi(fz_optarg); break; case 'b': fz_set_aa_level(ctx, atoi(fz_optarg)); break; @@ -839,6 +848,13 @@ int main(int argc, char **argv) pageno = atoi(argv[fz_optind++]); pdfapp_init(ctx, &gapp); + if (tint) + { + gapp.tint = tint; + gapp.tint_r = tint_r; + gapp.tint_g = tint_g; + gapp.tint_b = tint_b; + } winopen(); |