Ejemplo n.º 1
0
        public void GetPixelHeight_works()
        {
            var size = new ResizeSize
            {
                Height = 1,
                Unit   = ResizeUnit.Inch,
            };

            var result = size.GetPixelHeight(100, 96);

            Assert.Equal(96, result);
        }
Ejemplo n.º 2
0
        public void GetPixelHeight_uses_Width_when_scale_by_percent(ResizeFit fit)
        {
            var size = new ResizeSize
            {
                Fit    = fit,
                Width  = 100,
                Height = 50,
                Unit   = ResizeUnit.Percent,
            };

            var result = size.GetPixelHeight(100, 96);

            Assert.Equal(100, result);
        }
Ejemplo n.º 3
0
        public void GetPixelHeightUsesWidthWhenScaleByPercent(ResizeFit fit)
        {
            var size = new ResizeSize
            {
                Fit    = fit,
                Width  = 100,
                Height = 50,
                Unit   = ResizeUnit.Percent,
            };

            var result = size.GetPixelHeight(100, 96);

            Assert.AreEqual(100, result);
        }