public void Copy(Axis other) { m_Show = other.show; m_Type = other.type; m_Min = other.min; m_Max = other.max; m_SplitNumber = other.splitNumber; m_TextRotation = other.textRotation; m_ShowSplitLine = other.showSplitLine; m_SplitLineType = other.splitLineType; m_BoundaryGap = other.boundaryGap; m_Data.Clear(); foreach (var d in other.data) { m_Data.Add(d); } }
public void Copy(Axis other) { m_Show = other.show; m_Type = other.type; m_Min = other.min; m_Max = other.max; m_SplitNumber = other.splitNumber; m_Interval = other.interval; m_ShowSplitLine = other.showSplitLine; m_SplitLineType = other.splitLineType; m_BoundaryGap = other.boundaryGap; m_AxisName.Copy(other.axisName); m_AxisLabel.Copy(other.axisLabel); m_Data.Clear(); m_Data.Capacity = m_Data.Count; foreach (var d in other.data) m_Data.Add(d); }
private void DrawSplitLine(VertexHelper vh, bool isYAxis, SplitLineType type, Vector3 startPos, Vector3 endPos) { switch (type) { case SplitLineType.dashed: case SplitLineType.dotted: var startX = startPos.x; var startY = startPos.y; var dashLen = type == SplitLineType.dashed ? 6 : 2.5f; var count = isYAxis ? (endPos.x - startPos.x) / (dashLen * 2) : (endPos.y - startPos.y) / (dashLen * 2); for (int i = 0; i < count; i++) { if (isYAxis) { var toX = startX + dashLen; ChartUtils.DrawLine(vh, new Vector3(startX, startY), new Vector3(toX, startY), coordinate.tickness, themeInfo.axisSplitLineColor); startX += dashLen * 2; } else { var toY = startY + dashLen; ChartUtils.DrawLine(vh, new Vector3(startX, startY), new Vector3(startX, toY), coordinate.tickness, themeInfo.axisSplitLineColor); startY += dashLen * 2; } } break; case SplitLineType.solid: ChartUtils.DrawLine(vh, startPos, endPos, coordinate.tickness, themeInfo.axisSplitLineColor); break; } }