Esempio n. 1
0
 public static SFVec2D xy(double x, double y)
 {
     var v = new SFVec2D
     {
         X = x,
         Y = y
     };
     return v;
 }
Esempio n. 2
0
        private void draw_circle(SFVec2D point, Color? fill = null, Color? line = null)
        {
            Graphics g;
            Pen p;
            Brush b;
            float w = (float)node_diameter, h = (float)node_diameter;
            int X = (int)(point.X - w/2);
            int Y = (int)(point.Y - h/2);

            g=this.GetContext();

            if (line.HasValue)
            {
                p = new Pen(line.Value, 3);
            }
            else
            {
                p = new Pen(NodeLineColor, 3);
            }

            if (fill.HasValue)
            {
                b = new SolidBrush(fill.Value);
            }
            else
            {
                b = new SolidBrush(NodeFillColor);                
            }
          
            g.DrawEllipse(p, X, Y, w, h);
            g.FillEllipse(b, X, Y, w, h);
        }
Esempio n. 3
0
 public TNode()
 {
     Visible=true;
     Children=new List<TNode>();
     Point = SFVec2D.Zero;
 }