diff options
author | Russ Cox <rsc@swtch.com> | 2012-11-25 21:41:52 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2012-11-25 21:41:52 -0500 |
commit | d0e0701913f3aede1fcb256f3d1e9c60c9af6edf (patch) | |
tree | 89289d543069ef615e1a58343b8db1b93356fcc5 /src/libdraw | |
parent | 7b9ef735a8d1fddf3887853abbd065271fa9c293 (diff) | |
download | plan9port-d0e0701913f3aede1fcb256f3d1e9c60c9af6edf.tar.gz plan9port-d0e0701913f3aede1fcb256f3d1e9c60c9af6edf.tar.bz2 plan9port-d0e0701913f3aede1fcb256f3d1e9c60c9af6edf.zip |
devdraw, libdraw: add display->dpi
Fixed at 100 right now, but the plan is to make it accurate
and then use it.
R=rsc
http://codereview.appspot.com/6856091
Diffstat (limited to 'src/libdraw')
-rw-r--r-- | src/libdraw/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libdraw/init.c b/src/libdraw/init.c index 0ddb3adc..c698ec68 100644 --- a/src/libdraw/init.c +++ b/src/libdraw/init.c @@ -179,6 +179,15 @@ getimage0(Display *d, Image *image) image->clipr.min.y = atoi(info+9*12); image->clipr.max.x = atoi(info+10*12); image->clipr.max.y = atoi(info+11*12); + + a = bufimage(d, 3); + a[0] = 'q'; + a[1] = 1; + a[2] = 'd'; + d->dpi = 100; + if(flushimage(d, 0) >= 0 && _displayrddraw(d, info, 12) == 12) + d->dpi = atoi(info); + return image; } |