Ejemplo n.º 1
0
 public static int ForD3D9(LineDrawPattern pattern)
 {
     if (pattern == LineDrawPattern.SOLID)
     {
         return(Convert.ToInt32("11111111111111111111111111111111", 2));
     }
     if (pattern == LineDrawPattern.DASH)
     {
         return(Convert.ToInt32("11111111000111111110001111111100", 2));
     }
     if (pattern == LineDrawPattern.DASH_DOT)
     {
         return(Convert.ToInt32("11111111110011001111111111001100", 2));
     }
     if (pattern == LineDrawPattern.SMALL_DASH)
     {
         return(Convert.ToInt32("11111100111111001111110011111100", 2));
     }
     if (pattern == LineDrawPattern.DOT)
     {
         return(Convert.ToInt32("11001100110011001100110011001100", 2));
     }
     if (pattern == LineDrawPattern.DASH_DOT_DOT)
     {
         return(Convert.ToInt32("11111100110011001111110011001100", 2));
     }
     return(0);
 }
Ejemplo n.º 2
0
        public static float[] ForD2D1(LineDrawPattern pattern)
        {
            if (pattern == LineDrawPattern.SOLID)
            {
                return new float[] { 1, 0 }
            }
            ;
            if (pattern == LineDrawPattern.DASH)
            {
                return new float[] { 4, 4 }
            }
            ;
            if (pattern == LineDrawPattern.DASH_DOT)
            {
                return new float[] { 5, 1, 1, 1 }
            }
            ;
            if (pattern == LineDrawPattern.SMALL_DASH)
            {
                return new float[] { 3, 1 }
            }
            ;
            if (pattern == LineDrawPattern.DOT)
            {
                return new float[] { 1, 1 }
            }
            ;
            if (pattern == LineDrawPattern.DASH_DOT_DOT)
            {
                return new float[] { 3, 1, 1, 1, 1, 1 }
            }
            ;
            return(new float[] { 1, 0 });
        }
    }
}
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the Series
 /// </summary>
 /// <param name="name"></param>
 /// <param name="text"></param>
 /// <param name="HorizontalAxis"></param>
 /// <param name="VerticalAxis"></param>
 /// <param name="lineColor"></param>
 /// <param name="lineDrawPattern"></param>
 /// <param name="lineThickness"></param>
 /// <param name="autoShift"></param>
 /// <param name="keepInRightOfYAxis"></param>
 public Series(string name, string text, Axis HorizontalAxis, Axis VerticalAxis, Color lineColor, LineDrawPattern lineDrawPattern = LineDrawPattern.SOLID, float lineThickness = 2, bool autoShift = true, bool keepInRightOfYAxis = false)
 {
     if (HorizontalAxis.Direction != VerticalAxis.Direction)
     {
         points             = new DataPointCollection();
         base.Name          = name;
         Text               = text;
         points.AddNewItem += points_AddNewItem;
         XAxis              = HorizontalAxis;
         YAxis              = VerticalAxis;
         VerticalAxis.series.Add(this);
         LineColor          = (lineColor);
         LinePattern        = (lineDrawPattern);
         LineThickness      = (lineThickness);
         KeepInRightOfYAxis = keepInRightOfYAxis;
         AutoShift          = autoShift;
     }
     else
     {
         Exceptions.ExceptionHandler.ShowMessage("Two Axes of a series aren't Perpendicular to each other");
     }
 }