public void EndTextArea() { var lastTextArea = AddTextAreaIfEmpty(); if (lastTextArea.Transform.SizeY > 0) { return; } var lastTextAreaSize = 0.0f; foreach (var _text in lastTextArea.Texts) { float maxFontHeight = 0; foreach (var _textRun in _text.Texts) { maxFontHeight = Math.Max(maxFontHeight, SlideManager.FontHeght(_textRun.Font) * 1.2f); } lastTextAreaSize += maxFontHeight; } lastTextArea.Transform.SizeY = lastTextAreaSize; SlideManager.SetContentTransform(lastTextArea.Transform); WantReturn = false; }
public void EndTableRow() { if (CurrentTable == null) { return; } float maxFontHeight = 0; var lastRow = CurrentTable.Rows.Last(); foreach (var _cell in lastRow.Cells) { foreach (var _textRun in _cell.Texts.Texts) { maxFontHeight = Math.Max(maxFontHeight, SlideManager.FontHeght(_textRun.Font) * 1.2f); } } lastRow.Height = maxFontHeight; }