コード例 #1
0
ファイル: TextLayout.cs プロジェクト: emmauss/VisiPlacer
        // 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));
        }
コード例 #2
0
ファイル: TextLayout.cs プロジェクト: emmauss/VisiPlacer
 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));
 }
コード例 #3
0
 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;
 }