public bool SameStyle(WordStyle o) { return Equals(Font, o.Font) && (Color == o.Color) && (Point.Y == o.Point.Y); }
private static void DrawText(Graphics g, string text, Font font, Point point, Color color, List<WordStyle> words) { if (words == null) { TextRenderer.DrawText(g, text, font, point, color, tf); } else { WordStyle s = new WordStyle(text, font, point, color); if (words.Count > 0) { if (words[words.Count - 1].SameStyle(s)) { words[words.Count - 1].Text += text; return; } } words.Add(s); } }