Ejemplo n.º 1
0
        public void GetOrientedSize()
        {
            var size = new Size(100, 200);

            foreach (var orientation in new[] {
                ExifOrientation.None,
                ExifOrientation.Horizontal,
                ExifOrientation.FlipHorizontal,
                ExifOrientation.FlipVertical
            })
            {
                Assert.Equal(size, OrientationHelper.GetOrientatedSize(size, orientation));
            }

            foreach (var orientation in new[] {
                ExifOrientation.Transverse,
                ExifOrientation.Transpose,
                ExifOrientation.Rotate90,
                ExifOrientation.Rotate270
            })
            {
                Assert.Equal(new Size(200, 100), OrientationHelper.GetOrientatedSize(size, orientation));
            }
        }