Beispiel #1
0
        public static CGLineCap ToCGLineCap(this UGCapStyle capStyle)
        {
            switch (capStyle)
            {
            case UGCapStyle.Flat:
                return(CGLineCap.Butt);

            case UGCapStyle.Square:
                return(CGLineCap.Square);

            case UGCapStyle.Round:
                return(CGLineCap.Round);

            case UGCapStyle.Triangle:
            default:
                throw new NotSupportedException();
            }
        }
Beispiel #2
0
        public static DashCap ToGDIDashCap(this UGCapStyle capStyle)
        {
            switch (capStyle)
            {
            case UGCapStyle.Flat:
            case UGCapStyle.Square:
                return(DashCap.Flat);

            case UGCapStyle.Round:
                return(DashCap.Round);

            case UGCapStyle.Triangle:
                return(DashCap.Triangle);

            default:
                throw new NotSupportedException();
            }
        }
Beispiel #3
0
        public static CanvasCapStyle ToWin2DLineCap(this UGCapStyle capStyle)
        {
            switch (capStyle)
            {
            case UGCapStyle.Flat:
                return(CanvasCapStyle.Flat);

            case UGCapStyle.Square:
                return(CanvasCapStyle.Square);

            case UGCapStyle.Round:
                return(CanvasCapStyle.Round);

            case UGCapStyle.Triangle:
                return(CanvasCapStyle.Triangle);

            default:
                throw new NotSupportedException();
            }
        }