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;
|
||||
Biobuf *b;
|
||||
char *basename = argv[0];
|
||||
enum { Ninput = 16 };
|
||||
uchar buf[Ninput+1];
|
||||
int readstdin;
|
||||
|
@ -134,7 +133,7 @@ threadmain(int argc, char **argv)
|
|||
truetoboundingbox = 1;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
case 'i':
|
||||
|
@ -199,6 +198,13 @@ threadmain(int argc, char **argv)
|
|||
}else
|
||||
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';
|
||||
if(imagemode)
|
||||
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 */
|
||||
reverse = 0;
|
||||
|
||||
if(initdraw(0, 0, "page") < 0){
|
||||
fprint(2, "page: initdraw failed: %r\n");
|
||||
wexits("initdraw");
|
||||
}
|
||||
display->locking = 1;
|
||||
|
||||
truecolor = screen->depth > 8;
|
||||
viewer(doc);
|
||||
wexits(0);
|
||||
|
|
Loading…
Reference in a new issue