diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libdraw/init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libdraw/init.c b/src/libdraw/init.c index c698ec68..b2df7fd7 100644 --- a/src/libdraw/init.c +++ b/src/libdraw/init.c @@ -428,3 +428,10 @@ bufimage(Display *d, int n) return p; } +int +scalesize(Display *d, int n) +{ + if(d == nil || d->dpi <= DefaultDPI) + return n; + return (n*d->dpi+DefaultDPI/2)/DefaultDPI; +} |