Mercurial > projects > doodle
diff doodle/main/prog/doodler.d @ 69:d540f7e4af9e
Checkpoint
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Sat, 14 Aug 2010 19:39:58 +0930 |
parents | 20d6327c4a75 |
children | 06b4504cbcb0 |
line wrap: on
line diff
--- a/doodle/main/prog/doodler.d Fri Aug 13 15:53:48 2010 +0930 +++ b/doodle/main/prog/doodler.d Sat Aug 14 19:39:58 2010 +0930 @@ -50,7 +50,11 @@ layers ~= new PageLayer; layers ~= gridLayer; layers ~= toolLayer; - auto canvas = new Canvas(layers, toolLayer, gridLayer, 120.0); + + // assume the screen has PPI of 120.0 + immutable millimetersPerInch = 25.4; + immutable pixelsPerMillimetre = 120.0 / millimetersPerInch; + auto canvas = new Canvas(layers, toolLayer, gridLayer, pixelsPerMillimetre); vbox.packStart(canvas, true, true, 0);