private Line AddGridLine(double x1, double y1, double x2, double y2, GridLineType type) { x1 = _eh.GraphToPixelX(x1); y1 = _eh.GraphToPixelY(y1); x2 = _eh.GraphToPixelX(x2); y2 = _eh.GraphToPixelY(y2); EnsureNoInfinity(ref x1, ref y1, ref x2, ref y2); var brush = type == GridLineType.Minor ? BrushMinor : type == GridLineType.Major ? BrushMajor : BrushAxis; Line line; TheCanvas.Children.Add(line = new Line { X1 = x1, Y1 = y1, X2 = x2, Y2 = y2, Stroke = brush }); return(line); }
private Color GetColorForGridLineType(GridLineType type) { switch (type) { case GridLineType.Fractional: return(Renderer.FractionalGridLineColour); case GridLineType.Standard: return(Renderer.StandardGridLineColour); case GridLineType.Axis: return(Renderer.AxisGridLineColour); case GridLineType.Primary: return(Renderer.PrimaryGridLineColour); case GridLineType.Secondary: return(Renderer.SecondaryGridLineColour); case GridLineType.Boundary: return(Renderer.BoundaryGridLineColour); default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } }
public GridLine(GridLineType type) { }
public GridLine(GridLineType type, Vector3 start, Vector3 end) { Type = type; Line = new Line(start, end); }