public void ExpandAllTypes_2()
        {
            PixelTypes pixelTypes = PixelTypes.Rgba32 | PixelTypes.Bgra32 | PixelTypes.RgbaVector;

            IEnumerable <KeyValuePair <PixelTypes, Type> > expanded = pixelTypes.ExpandAllTypes();

            Assert.Equal(3, expanded.Count());

            AssertContainsPixelType <Rgba32>(PixelTypes.Rgba32, expanded);
            AssertContainsPixelType <Bgra32>(PixelTypes.Bgra32, expanded);
            AssertContainsPixelType <RgbaVector>(PixelTypes.RgbaVector, expanded);
        }
        public void ExpandAllTypes_1()
        {
            PixelTypes pixelTypes = PixelTypes.A8 | PixelTypes.Bgr565 | PixelTypes.HalfVector2 | PixelTypes.Rgba32;

            IEnumerable <KeyValuePair <PixelTypes, Type> > expanded = pixelTypes.ExpandAllTypes();

            Assert.Equal(4, expanded.Count());

            AssertContainsPixelType <A8>(PixelTypes.A8, expanded);
            AssertContainsPixelType <Bgr565>(PixelTypes.Bgr565, expanded);
            AssertContainsPixelType <HalfVector2>(PixelTypes.HalfVector2, expanded);
            AssertContainsPixelType <Rgba32>(PixelTypes.Rgba32, expanded);
        }
Esempio n. 3
0
        public void ToTypes()
        {
            PixelTypes pixelTypes = PixelTypes.Alpha8 | PixelTypes.Bgr565 | PixelTypes.Color | PixelTypes.HalfVector2 | PixelTypes.StandardImageClass;

            IEnumerable <KeyValuePair <PixelTypes, Type> > expanded = pixelTypes.ExpandAllTypes();

            Assert.Equal(expanded.Count(), 5);

            AssertContainsPixelType <Alpha8>(PixelTypes.Alpha8, expanded);
            AssertContainsPixelType <Bgr565>(PixelTypes.Bgr565, expanded);
            AssertContainsPixelType <Color>(PixelTypes.Color, expanded);
            AssertContainsPixelType <HalfVector2>(PixelTypes.HalfVector2, expanded);
            AssertContainsPixelType <Color>(PixelTypes.StandardImageClass, expanded);
        }