private void drawFlag(Graphics g, GraphPlot plot, GraphAxisStyle style, bool bTopMost = false) { if (plot.Plots.Count == 0 || plot.Plots[0] == null || plot.Plots[0].Count == 0) { return; } Plot plotLast = plot.LastVisiblePlot; if (plotLast == null) { return; } if (!plotLast.Active) { return; } bool bEnabled = plot.Configuration.EnableFlag; if (plot.Configuration.EnableTopMostFlag != bTopMost) { return; } drawFlag(g, plotLast.Y, plot.Configuration.EnableFlag, plot.Configuration.FlagColor, plot.Configuration.FlagTextColor, plot.Configuration.FlagBorderColor); }
private float drawLabel(Graphics g, float fX, float fY, GraphPlot plot) { if (!plot.Configuration.Visible) { return(0); } if (!plot.Configuration.EnableLabel) { return(0); } if (plot.Configuration.Name.Length == 0) { return(0); } Color clr = plot.Configuration.FlagColor; if (clr == Color.Transparent) { clr = plot.Configuration.LineColor; } if (clr == Color.Transparent) { clr = plot.Configuration.PlotFillColor; } if (clr == Color.Transparent) { clr = plot.Configuration.PlotLineColor; } if (clr == Color.Transparent) { return(0); } Brush br = m_colLabelBrushes.Add(clr); g.DrawString(plot.Configuration.Name, m_config.PlotArea.LabelFont, br, m_rcBounds.Left + fX, m_rcBounds.Top + fY); return(g.MeasureString(plot.Configuration.Name, m_config.PlotArea.LabelFont).Height); }