52 references to Constants
PresentationCore (52)
MS\Internal\FontFace\CompositeFontParser.cs (8)
28else if (value > Constants.GreatestMutiplierOfEm) 30value = Constants.GreatestMutiplierOfEm; 32else if (value < -Constants.GreatestMutiplierOfEm) 34value = -Constants.GreatestMutiplierOfEm; 44else if (value > Constants.GreatestMutiplierOfEm) 46value = Constants.GreatestMutiplierOfEm; 60else if (value > Constants.GreatestMutiplierOfEm) 62value = Constants.GreatestMutiplierOfEm;
MS\Internal\TextFormatting\FormatSettings.cs (4)
57_maxLineWidth = Constants.IdealInfiniteWidth; 158return _pap.Wrap ? finiteFormatWidth : Constants.IdealInfiniteWidth; 169int formatWidth = (paragraphWidth <= 0 ? Constants.IdealInfiniteWidth : paragraphWidth); 174formatWidth = Math.Min(formatWidth, Constants.IdealInfiniteWidth);
MS\Internal\TextFormatting\FullTextState.cs (1)
102Constants.IdealInfiniteWidth // formatWidth
MS\Internal\TextFormatting\LineServicesCallbacks.cs (8)
437lstTextMetrics.dvAscent = (int)Math.Round(typeface.Baseline(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 438lstTextMetrics.dvMultiLineHeight = (int)Math.Round(typeface.LineSpacing(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 1894(int)(lsrun.EmSize * Constants.MinInterWordCompressionPerEm), 1944(int)(lsrun.EmSize * Constants.MaxInterWordExpansionPerEm), 1999pplsAdjustRight[1][i] = expandedBy * Constants.AcceptableLineStretchability; 2048(int)(em * Constants.MinInterWordCompressionPerEm), 2175(int)(em * Constants.MaxInterWordExpansionPerEm), 2265pplsExpansionRight[1][igi + i] = expandedBy * Constants.AcceptableLineStretchability;
MS\Internal\TextFormatting\SimpleTextLine.cs (2)
326_height = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip); 327_baselineOffset = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip);
MS\Internal\TextFormatting\TextFormatterImp.cs (9)
460ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphWidth, Constants.RealInfiniteWidth); 462double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm; 466ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.Indent, Constants.RealInfiniteWidth, "paragraphProperties.Indent"); 467ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.LineHeight, Constants.RealInfiniteWidth, "paragraphProperties.LineHeight"); 469ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.DefaultIncrementalTab, Constants.RealInfiniteWidth, "paragraphProperties.DefaultIncrementalTab"); 675return i * Constants.DefaultIdealToReal; 692value = Math.Max(value, Constants.DefaultIdealToReal); 738get { return Constants.DefaultRealToIdeal; }
MS\Internal\TextFormatting\TextMetrics.cs (4)
192* pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 193/ pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 201_textAscent = (int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode)); 202_textHeight = (int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode));
MS\Internal\TextFormatting\TextRunCacheImp.cs (2)
121double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
MS\Internal\TextFormatting\TextStore.cs (2)
2355_settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip), 2360else if (metrics.Width > _settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip))
System\Windows\Media\CharacterMetrics.cs (8)
8using Constants = MS.Internal.TextFormatting.Constants; 296int hash = (int)(_blackBoxWidth * Constants.DefaultRealToIdeal); 297hash = (hash * HashMultiplier) + (int)(_blackBoxHeight * Constants.DefaultRealToIdeal); 298hash = (hash * HashMultiplier) + (int)(_baseline * Constants.DefaultRealToIdeal); 299hash = (hash * HashMultiplier) + (int)(_leftSideBearing * Constants.DefaultRealToIdeal); 300hash = (hash * HashMultiplier) + (int)(_rightSideBearing * Constants.DefaultRealToIdeal); 301hash = (hash * HashMultiplier) + (int)(_topSideBearing * Constants.DefaultRealToIdeal); 302hash = (hash * HashMultiplier) + (int)(_bottomSideBearing * Constants.DefaultRealToIdeal);
System\Windows\Media\FormattedText.cs (2)
2025const double MaxFontEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
System\Windows\Media\textformatting\TextParagraphCache.cs (2)
168return Constants.IdealInfiniteWidth; 172ArgumentOutOfRangeException.ThrowIfGreaterThan(maxLineWidth, Constants.RealInfiniteWidth);