// returns a TextLayout that still gets fractional points while cropped public static LayoutChoice_Set New_Croppable(TextItem_Configurer textItem, double fontSize, bool scoreIfEmpty = true) { // We make a ScrollLayout and ask it to do the size computations but to not actually put the result into a ScrollView TextLayout textLayout = new TextLayout(textItem, fontSize, true, scoreIfEmpty); return(ScrollLayout.New(textLayout, null)); }
public TextLayout(TextItem_Configurer textItem, double fontSize, bool allowSplittingWords = false, bool scoreIfEmpty = true) { this.TextItem_Configurer = textItem; this.FontSize = fontSize; this.ScoreIfEmpty = scoreIfEmpty; this.textItem_text = this.TextItem_Configurer.ModelledText; this.AllowSplittingWords = allowSplittingWords; textItem.Add_TextChanged_Handler(new PropertyChangedEventHandler(this.On_TextChanged)); }
public Specific_TextLayout(TextItem_Configurer textItem, double width, double height, double fontSize, LayoutScore score, String displayText, Size desiredSize) { this.textItem = textItem; this.width = width; this.height = height; this.fontSize = fontSize; this.score = score; this.DisplayText = displayText; this.DesiredSizeForDebugging = desiredSize; }