public override void Visit(IObject parentObject) { if (parentObject is TextToken2D) { int currentScrollingValue = (int)(this.currentValue * this.cursorTextTo + (1 - this.currentValue) * this.cursorTextFrom); TextToken2D textToken2D = parentObject as TextToken2D; textToken2D.TextCursor = currentScrollingValue; } }
public static int GetWidthFromTextToken(TextToken2D textToken2D) { return((int)(fontToWidths[textToken2D.TextFont] * textToken2D.CharacterSize / 1000f)); }