예제 #1
0
        public void TestPixelDPI()
        {
            PixelUnit pixel = 1000d;
            DPIUnit   dpi   = 600d;
            InchUnit  inch  = 25d;

            Assert.AreEqual(1000d / 600d, pixel.ToInchLength(dpi).Value);
            Assert.AreEqual(25d / (1d / 600d), inch.ToPixelCount(dpi).Value);
        }
예제 #2
0
        public void TestDPI()
        {
            DPIUnit val1 = 100d;
            DPIUnit val2 = 10d;

            Assert.AreEqual(110d, (val1 + val2).Value);
            Assert.AreEqual(90d, (val1 - val2).Value);
            Assert.AreEqual(1000d, (val1 * val2).Value);
            Assert.AreEqual(10d, (val1 / val2).Value);
        }