52 references to Constants
PresentationCore (52)
MS\Internal\FontFace\CompositeFontParser.cs (8)
27else if (value > Constants.GreatestMutiplierOfEm) 29value = Constants.GreatestMutiplierOfEm; 31else if (value < -Constants.GreatestMutiplierOfEm) 33value = -Constants.GreatestMutiplierOfEm; 43else if (value > Constants.GreatestMutiplierOfEm) 45value = Constants.GreatestMutiplierOfEm; 59else if (value > Constants.GreatestMutiplierOfEm) 61value = Constants.GreatestMutiplierOfEm;
MS\Internal\TextFormatting\FormatSettings.cs (4)
56_maxLineWidth = Constants.IdealInfiniteWidth; 157return _pap.Wrap ? finiteFormatWidth : Constants.IdealInfiniteWidth; 168int formatWidth = (paragraphWidth <= 0 ? Constants.IdealInfiniteWidth : paragraphWidth); 173formatWidth = Math.Min(formatWidth, Constants.IdealInfiniteWidth);
MS\Internal\TextFormatting\FullTextState.cs (1)
101Constants.IdealInfiniteWidth // formatWidth
MS\Internal\TextFormatting\LineServicesCallbacks.cs (8)
425lstTextMetrics.dvAscent = (int)Math.Round(typeface.Baseline(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 426lstTextMetrics.dvMultiLineHeight = (int)Math.Round(typeface.LineSpacing(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 1884(int)(lsrun.EmSize * Constants.MinInterWordCompressionPerEm), 1934(int)(lsrun.EmSize * Constants.MaxInterWordExpansionPerEm), 1989pplsAdjustRight[1][i] = expandedBy * Constants.AcceptableLineStretchability; 2038(int)(em * Constants.MinInterWordCompressionPerEm), 2165(int)(em * Constants.MaxInterWordExpansionPerEm), 2255pplsExpansionRight[1][igi + i] = expandedBy * Constants.AcceptableLineStretchability;
MS\Internal\TextFormatting\SimpleTextLine.cs (2)
325_height = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip); 326_baselineOffset = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip);
MS\Internal\TextFormatting\TextFormatterImp.cs (9)
459ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphWidth, Constants.RealInfiniteWidth); 461double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm; 465ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.Indent, Constants.RealInfiniteWidth, "paragraphProperties.Indent"); 466ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.LineHeight, Constants.RealInfiniteWidth, "paragraphProperties.LineHeight"); 468ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.DefaultIncrementalTab, Constants.RealInfiniteWidth, "paragraphProperties.DefaultIncrementalTab"); 674return i * Constants.DefaultIdealToReal; 691value = Math.Max(value, Constants.DefaultIdealToReal); 737get { return Constants.DefaultRealToIdeal; }
MS\Internal\TextFormatting\TextMetrics.cs (4)
191* pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 192/ pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 200_textAscent = (int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode)); 201_textHeight = (int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode));
MS\Internal\TextFormatting\TextRunCacheImp.cs (2)
120double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
MS\Internal\TextFormatting\TextStore.cs (2)
2354_settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip), 2359else if (metrics.Width > _settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip))
System\Windows\Media\CharacterMetrics.cs (8)
7using Constants = MS.Internal.TextFormatting.Constants; 289int hash = (int)(_blackBoxWidth * Constants.DefaultRealToIdeal); 290hash = (hash * HashMultiplier) + (int)(_blackBoxHeight * Constants.DefaultRealToIdeal); 291hash = (hash * HashMultiplier) + (int)(_baseline * Constants.DefaultRealToIdeal); 292hash = (hash * HashMultiplier) + (int)(_leftSideBearing * Constants.DefaultRealToIdeal); 293hash = (hash * HashMultiplier) + (int)(_rightSideBearing * Constants.DefaultRealToIdeal); 294hash = (hash * HashMultiplier) + (int)(_topSideBearing * Constants.DefaultRealToIdeal); 295hash = (hash * HashMultiplier) + (int)(_bottomSideBearing * Constants.DefaultRealToIdeal);
System\Windows\Media\FormattedText.cs (2)
2008private const double MaxFontEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
System\Windows\Media\textformatting\TextParagraphCache.cs (2)
167return Constants.IdealInfiniteWidth; 171ArgumentOutOfRangeException.ThrowIfGreaterThan(maxLineWidth, Constants.RealInfiniteWidth);