Exemplo n.º 1
0
        public static GradientWrapMode ToEto(this swm.GradientSpreadMethod spread)
        {
            switch (spread)
            {
            case swm.GradientSpreadMethod.Reflect:
                return(GradientWrapMode.Reflect);

            case swm.GradientSpreadMethod.Repeat:
                return(GradientWrapMode.Repeat);

            default:
                throw new NotSupportedException();
            }
        }
Exemplo n.º 2
0
        public static D2D.ExtendMode ToD2DExtendMode(this Media.GradientSpreadMethod mode)
        {
            switch (mode)
            {
            case Media.GradientSpreadMethod.Pad:
                return(D2D.ExtendMode.Clamp);

            case Media.GradientSpreadMethod.Reflect:
                return(D2D.ExtendMode.Mirror);

            case Media.GradientSpreadMethod.Repeat:
                return(D2D.ExtendMode.Wrap);

            default:
                return(D2D.ExtendMode.Wrap);
            }
        }