mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
page: scale ppi on high-res displays
Also fix wording of -w warning.
This commit is contained in:
parent
ffbdd1aa20
commit
940f1fd6af
1 changed files with 8 additions and 8 deletions
|
@ -96,7 +96,6 @@ threadmain(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Document *doc;
|
Document *doc;
|
||||||
Biobuf *b;
|
Biobuf *b;
|
||||||
char *basename = argv[0];
|
|
||||||
enum { Ninput = 16 };
|
enum { Ninput = 16 };
|
||||||
uchar buf[Ninput+1];
|
uchar buf[Ninput+1];
|
||||||
int readstdin;
|
int readstdin;
|
||||||
|
@ -134,7 +133,7 @@ threadmain(int argc, char **argv)
|
||||||
truetoboundingbox = 1;
|
truetoboundingbox = 1;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
fprint(2, "%s: -w has only the effect of -R X11 systems\n", basename);
|
fprint(2, "warning: page -w only supported on x11 systems\n");
|
||||||
resizing = 1;
|
resizing = 1;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
|
@ -199,6 +198,13 @@ threadmain(int argc, char **argv)
|
||||||
}else
|
}else
|
||||||
b = nil;
|
b = nil;
|
||||||
|
|
||||||
|
if(initdraw(0, 0, "page") < 0){
|
||||||
|
fprint(2, "page: initdraw failed: %r\n");
|
||||||
|
wexits("initdraw");
|
||||||
|
}
|
||||||
|
display->locking = 1;
|
||||||
|
ppi = scalesize(display, ppi);
|
||||||
|
|
||||||
buf[Ninput] = '\0';
|
buf[Ninput] = '\0';
|
||||||
if(imagemode)
|
if(imagemode)
|
||||||
doc = initgfx(nil, 0, nil, nil, 0);
|
doc = initgfx(nil, 0, nil, nil, 0);
|
||||||
|
@ -237,12 +243,6 @@ threadmain(int argc, char **argv)
|
||||||
if(reverse == -1) /* neither cmdline nor ps reader set it */
|
if(reverse == -1) /* neither cmdline nor ps reader set it */
|
||||||
reverse = 0;
|
reverse = 0;
|
||||||
|
|
||||||
if(initdraw(0, 0, "page") < 0){
|
|
||||||
fprint(2, "page: initdraw failed: %r\n");
|
|
||||||
wexits("initdraw");
|
|
||||||
}
|
|
||||||
display->locking = 1;
|
|
||||||
|
|
||||||
truecolor = screen->depth > 8;
|
truecolor = screen->depth > 8;
|
||||||
viewer(doc);
|
viewer(doc);
|
||||||
wexits(0);
|
wexits(0);
|
||||||
|
|
Loading…
Reference in a new issue