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)
426lstTextMetrics.dvAscent = (int)Math.Round(typeface.Baseline(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 427lstTextMetrics.dvMultiLineHeight = (int)Math.Round(typeface.LineSpacing(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 1885(int)(lsrun.EmSize * Constants.MinInterWordCompressionPerEm), 1935(int)(lsrun.EmSize * Constants.MaxInterWordExpansionPerEm), 1990pplsAdjustRight[1][i] = expandedBy * Constants.AcceptableLineStretchability; 2039(int)(em * Constants.MinInterWordCompressionPerEm), 2166(int)(em * Constants.MaxInterWordExpansionPerEm), 2256pplsExpansionRight[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; 290int hash = (int)(_blackBoxWidth * Constants.DefaultRealToIdeal); 291hash = (hash * HashMultiplier) + (int)(_blackBoxHeight * Constants.DefaultRealToIdeal); 292hash = (hash * HashMultiplier) + (int)(_baseline * Constants.DefaultRealToIdeal); 293hash = (hash * HashMultiplier) + (int)(_leftSideBearing * Constants.DefaultRealToIdeal); 294hash = (hash * HashMultiplier) + (int)(_rightSideBearing * Constants.DefaultRealToIdeal); 295hash = (hash * HashMultiplier) + (int)(_topSideBearing * Constants.DefaultRealToIdeal); 296hash = (hash * HashMultiplier) + (int)(_bottomSideBearing * Constants.DefaultRealToIdeal);
System\Windows\Media\FormattedText.cs (2)
2011const double MaxFontEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
System\Windows\Media\textformatting\TextParagraphCache.cs (2)
168return Constants.IdealInfiniteWidth; 172ArgumentOutOfRangeException.ThrowIfGreaterThan(maxLineWidth, Constants.RealInfiniteWidth);