コード例 #1
0
		public void ProcessAddedPoint(Graph graph, Vector2D point)
		{
			viewport = graph.Viewport;
			DeriveExtremities();
			AdjustViewport(point);
			graph.Viewport = viewport;
		}
コード例 #2
0
		private string GetPercentileLabelText(Graph graph, int index)
		{
			float value = graph.Viewport.Top + index * graph.Viewport.Height / NumberOfPercentiles;
			if (ArePercentileLabelsInteger)
				value = (int)value;
			return PercentilePrefix + value + PercentileSuffix;
		}
コード例 #3
0
ファイル: RenderAxes.cs プロジェクト: whztt07/DeltaEngine
		public void Refresh(Graph graph)
		{
			if (graph.IsVisible && IsVisible)
				ShowAxes(graph);
			else
				HideAxes();
		}
コード例 #4
0
		private void CreatePercentile(Graph graph, int index)
		{
			Line2D percentile = CreateBlankPercentile();
			percentile.StartPoint = GetPercentileStartPoint(graph, index);
			percentile.EndPoint = GetPercentileEndPoint(graph, index);
			percentile.Color = PercentileColor;
			percentile.RenderLayer = graph.RenderLayer + RenderLayerOffset;
			percentile.IsVisible = true;
			Percentiles.Add(percentile);
		}
コード例 #5
0
		private void CreatePercentileLabel(Graph graph, int index)
		{
			PercentileLabels.Add(new FontText(Font.Default, GetPercentileLabelText(graph, index),
				GetPercentileLabelDrawArea(graph, index))
			{
				RenderLayer = graph.RenderLayer + RenderLayerOffset,
				Color = PercentileLabelColor,
				HorizontalAlignment = HorizontalAlignment.Left,
				VerticalAlignment = VerticalAlignment.Center,
			});
		}
コード例 #6
0
ファイル: RenderKey.cs プロジェクト: whztt07/DeltaEngine
		private void CreateKeyLabel(Graph graph, int index)
		{
			keyLabels.Add(new FontText(Font.Default, graph.Lines[index].Key,
				GetKeyLabelDrawArea(graph, index))
			{
				RenderLayer = graph.RenderLayer + RenderLayerOffset,
				Color = graph.Lines[index].Color,
				HorizontalAlignment = HorizontalAlignment.Left,
				VerticalAlignment = VerticalAlignment.Top
			});
		}
コード例 #7
0
ファイル: RenderAxes.cs プロジェクト: whztt07/DeltaEngine
		private void ShowAxes(Graph graph)
		{
			renderLayer = graph.RenderLayer + RenderLayerOffset;
			viewport = graph.Viewport;
			drawArea = graph.DrawArea;
			clippingBounds = Rectangle.FromCorners(
				ToQuadratic(viewport.BottomLeft, viewport, drawArea),
				ToQuadratic(viewport.TopRight, viewport, drawArea));
			Vector2D origin = graph.Origin;
			SetAxis(XAxis, ToQuadratic(new Vector2D(viewport.Left, origin.Y), viewport, drawArea),
				ToQuadratic(new Vector2D(viewport.Right, origin.Y), viewport, drawArea));
			SetAxis(YAxis, ToQuadratic(new Vector2D(origin.X, viewport.Top), viewport, drawArea),
				ToQuadratic(new Vector2D(origin.X, viewport.Bottom), viewport, drawArea));
		}
コード例 #8
0
		private void CreateNewPercentileLabels(Graph graph)
		{
			for (int i = 0; i <= NumberOfPercentiles; i++)
				CreatePercentileLabel(graph, i);
		}
コード例 #9
0
		public void Refresh(Graph graph)
		{
			ClearOldPercentileLabels();
			if (graph.IsVisible && IsVisible)
				CreateNewPercentileLabels(graph);
		}
コード例 #10
0
		//ncrunch: no coverage start
		public void Process(Graph graph)
		{
			if (MaximumNumberOfPoints > 0)
				foreach (GraphLine line in graph.Lines)
					PrunePointsFromLine(line);
		}
コード例 #11
0
ファイル: RenderKey.cs プロジェクト: whztt07/DeltaEngine
		private void CreateNewKeyLabels(Graph graph)
		{
			for (int i = 0; i < graph.Lines.Count; i++)
				if (graph.Lines[i].Key != "")
					CreateKeyLabel(graph, i);
		}
コード例 #12
0
ファイル: RenderKey.cs プロジェクト: whztt07/DeltaEngine
		public void Refresh(Graph graph)
		{
			ClearOldKeyLabels();
			if (graph.IsVisible && IsVisible)
				CreateNewKeyLabels(graph);
		}
コード例 #13
0
ファイル: GraphLine.cs プロジェクト: cyecp/DeltaEngine.OpenTK
		internal GraphLine(Graph graph)
		{
			this.graph = graph;
		}