Exemple #1
0
 public Wave()
     : base()
 {
     this.thick = 1;
     this.arrow = false;
     this.style = GLinear.SOLID;
     this.route = new List <Coord>();
     this.color = Color.FromRgb(255, 0, 0);
 }
Exemple #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="graph">图元画板</param>
 public GPoly(MagicGraphic graph)
     : base(graph, new DrawingVisual())
 {
     this.thick = 1;
     this.color = Colors.Red;
     this.style = GLinear.SOLID;
     this.stuff = Colors.Transparent;
     this.route = new List <GPoint>();
 }
Exemple #3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="graph">图元画板</param>
 public GRect(MagicGraphic graph)
     : base(graph, new DrawingVisual())
 {
     this.thick = 1;
     this.slope = 0;
     this.color = Colors.Red;
     this.style = GLinear.SOLID;
     this.stuff = Colors.Transparent;
 }
Exemple #4
0
 public Poly()
     : base()
 {
     this.thick = 1;
     this.style = GLinear.SOLID;
     this.route = new List <Coord>();
     this.stuff = Colors.Transparent;
     this.color = Color.FromRgb(255, 0, 0);
 }
Exemple #5
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="graph">图元画板</param>
 public GLine(MagicGraphic graph)
     : base(graph, new DrawingVisual())
 {
     this.thick = 1;
     this.arrow = false;
     this.color = Colors.Red;
     this.style = GLinear.SOLID;
     this.route = new List <GPoint>();
 }
Exemple #6
0
 public Rect()
     : base()
 {
     this.thick = 1;
     this.slope = 0;
     this.extra = null;
     this.point = null;
     this.style = GLinear.SOLID;
     this.stuff = Colors.Transparent;
     this.color = Color.FromRgb(255, 0, 0);
 }
Exemple #7
0
        /// <summary>
        /// 初始化画笔
        /// </summary>
        /// <returns></returns>
        protected Pen InitPen(GLinear style, Color color, int thick)
        {
            Pen pen = new Pen(new SolidColorBrush(Color.FromRgb(color.R, color.G, color.B)), thick);

            switch (style)
            {
            case GLinear.DOT:
            {
                pen.DashStyle = DashStyles.Dot;
                break;
            }

            case GLinear.DASH:
            {
                pen.DashStyle = DashStyles.Dash;
                break;
            }

            case GLinear.SOLID:
            {
                pen.DashStyle = DashStyles.Solid;
                break;
            }

            case GLinear.DASHDOT:
            {
                pen.DashStyle = DashStyles.DashDot;
                break;
            }

            default:
            {
                pen.DashStyle = DashStyles.Solid;
                break;
            }
            }
            // 冻结画笔
            if (pen.CanFreeze)
            {
                pen.Freeze();
            }
            return(pen);
        }
Exemple #8
0
 public Rect(Option option)
     : this()
 {
     if (!MatchUtils.IsEmpty(option))
     {
         // 用户配置
         if (option.Exist("Index"))
         {
             this.Index = option.Fetch <string>("Index");
         }
         if (option.Exist("Group"))
         {
             this.Group = option.Fetch <string>("Group");
         }
         if (option.Exist("Title"))
         {
             this.Title = option.Fetch <string>("Title");
         }
         if (option.Exist("Mouse"))
         {
             this.Mouse = option.Fetch <Cursor>("Mouse");
         }
         if (option.Exist("Matte"))
         {
             this.Matte = option.Fetch <bool>("Matte");
         }
         if (option.Exist("Amend"))
         {
             this.Amend = option.Fetch <bool>("Amend");
         }
         if (option.Exist("Alpha"))
         {
             this.Alpha = option.Fetch <int>("Alpha");
         }
         if (option.Exist("Thick"))
         {
             this.Thick = option.Fetch <int>("Thick");
         }
         if (option.Exist("Slope"))
         {
             this.Slope = option.Fetch <double>("Slope");
         }
         if (option.Exist("Arise"))
         {
             this.Arise = option.Fetch <Arise>("Arise");
         }
         if (option.Exist("Stuff"))
         {
             this.Stuff = option.Fetch <Color>("Stuff");
         }
         if (option.Exist("Color"))
         {
             this.Color = option.Fetch <Color>("Color");
         }
         if (option.Exist("Extra"))
         {
             this.Extra = option.Fetch <GExtra>("Extra");
         }
         if (option.Exist("Point"))
         {
             this.Point = option.Fetch <Coord>("Point");
         }
         if (option.Exist("Style"))
         {
             this.Style = option.Fetch <GLinear>("Style");
         }
     }
 }
Exemple #9
0
 public GFrame(int thick, Color color, GLinear style)
 {
     this.thick = thick;
     this.color = color;
     this.style = style;
 }
Exemple #10
0
 public GFrame(int thick, GLinear style)
     : this(thick, Color.FromRgb(255, 0, 0), style)
 {
 }