public CharacterFlowItem(char Name, Font Font) { this.Name = Name; this.Font = Font; }
/// <summary> /// Creates a flow item that displays a glyph of a certain font. /// </summary> public static CharacterFlowItem Character(char Name, Font Font) { return new CharacterFlowItem(Name, Font); }
/// <summary> /// Creates a sequence of flow items to display the given text. /// </summary> public static List<FlowItem> CreateText(string Text, Font Font, double SpaceLength, bool CutEnd) { List<FlowItem> items = new List<FlowItem>(); SpaceFlowItem space = Space(SpaceLength, true); for (int t = 0; t < Text.Length; t++) { char c = Text[t]; switch (c) { case ' ': items.Add(space); break; case '\n': items.Add(Cut); break; default: items.Add(Character(c, Font)); break; } } if (CutEnd) { items.Add(FlowItem.Cut); } return items; }
public TextStyle(Font Font, Color Back) { this.Font = Font; this.Back = Back; }