Ejemplo n.º 1
0
        private void SetPen()
        {
            if (pen != null)
            {
                mapPenColor = pen.Color;
                mapPenWidth = pen.Width;
                switch (pen.DashStyle)
                {
                case System.Drawing.Drawing2D.DashStyle.Custom:
                    mapDashStyle = SvgDashStyle.Custom;
                    break;

                case System.Drawing.Drawing2D.DashStyle.Dash:
                    mapDashStyle = SvgDashStyle.Dash;
                    break;

                case System.Drawing.Drawing2D.DashStyle.DashDot:
                    mapDashStyle = SvgDashStyle.DashDot;
                    break;

                case System.Drawing.Drawing2D.DashStyle.DashDotDot:
                    mapDashStyle = SvgDashStyle.DashDotDot;
                    break;

                case System.Drawing.Drawing2D.DashStyle.Dot:
                    mapDashStyle = SvgDashStyle.Dot;
                    break;

                case System.Drawing.Drawing2D.DashStyle.Solid:
                    mapDashStyle = SvgDashStyle.Solid;
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void SetPen()
        {
            if (this.pen != null)
            {
                this.mapPenColor = this.pen.Color;
                this.mapPenWidth = this.pen.Width;
                switch (this.pen.DashStyle)
                {
                case System.Drawing.Drawing2D.DashStyle.Custom:
                    this.mapDashStyle = SvgDashStyle.Custom;
                    break;

                case System.Drawing.Drawing2D.DashStyle.Dash:
                    this.mapDashStyle = SvgDashStyle.Dash;
                    break;

                case System.Drawing.Drawing2D.DashStyle.DashDot:
                    this.mapDashStyle = SvgDashStyle.DashDot;
                    break;

                case System.Drawing.Drawing2D.DashStyle.DashDotDot:
                    this.mapDashStyle = SvgDashStyle.DashDotDot;
                    break;

                case System.Drawing.Drawing2D.DashStyle.Dot:
                    this.mapDashStyle = SvgDashStyle.Dot;
                    break;

                case System.Drawing.Drawing2D.DashStyle.Solid:
                    this.mapDashStyle = SvgDashStyle.Solid;
                    break;
                }
            }
        }