52 references to Constants
PresentationCore (52)
MS\Internal\FontFace\CompositeFontParser.cs (8)
40else if (value > Constants.GreatestMutiplierOfEm) 42value = Constants.GreatestMutiplierOfEm; 44else if (value < -Constants.GreatestMutiplierOfEm) 46value = -Constants.GreatestMutiplierOfEm; 56else if (value > Constants.GreatestMutiplierOfEm) 58value = Constants.GreatestMutiplierOfEm; 72else if (value > Constants.GreatestMutiplierOfEm) 74value = Constants.GreatestMutiplierOfEm;
MS\Internal\TextFormatting\FormatSettings.cs (4)
62_maxLineWidth = Constants.IdealInfiniteWidth; 163return _pap.Wrap ? finiteFormatWidth : Constants.IdealInfiniteWidth; 174int formatWidth = (paragraphWidth <= 0 ? Constants.IdealInfiniteWidth : paragraphWidth); 179formatWidth = Math.Min(formatWidth, Constants.IdealInfiniteWidth);
MS\Internal\TextFormatting\FullTextState.cs (1)
108Constants.IdealInfiniteWidth // formatWidth
MS\Internal\TextFormatting\LineServicesCallbacks.cs (8)
456lstTextMetrics.dvAscent = (int)Math.Round(typeface.Baseline(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 457lstTextMetrics.dvMultiLineHeight = (int)Math.Round(typeface.LineSpacing(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 1913(int)(lsrun.EmSize * Constants.MinInterWordCompressionPerEm), 1963(int)(lsrun.EmSize * Constants.MaxInterWordExpansionPerEm), 2018pplsAdjustRight[1][i] = expandedBy * Constants.AcceptableLineStretchability; 2067(int)(em * Constants.MinInterWordCompressionPerEm), 2194(int)(em * Constants.MaxInterWordExpansionPerEm), 2284pplsExpansionRight[1][igi + i] = expandedBy * Constants.AcceptableLineStretchability;
MS\Internal\TextFormatting\SimpleTextLine.cs (2)
335_height = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip); 336_baselineOffset = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip);
MS\Internal\TextFormatting\TextFormatterImp.cs (9)
483ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphWidth, Constants.RealInfiniteWidth); 485double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm; 489ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.Indent, Constants.RealInfiniteWidth, "paragraphProperties.Indent"); 490ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.LineHeight, Constants.RealInfiniteWidth, "paragraphProperties.LineHeight"); 492ArgumentOutOfRangeException.ThrowIfGreaterThan(paragraphProperties.DefaultIncrementalTab, Constants.RealInfiniteWidth, "paragraphProperties.DefaultIncrementalTab"); 698return i * Constants.DefaultIdealToReal; 715value = Math.Max(value, Constants.DefaultIdealToReal); 761get { return Constants.DefaultRealToIdeal; }
MS\Internal\TextFormatting\TextMetrics.cs (4)
207* pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 208/ pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 216_textAscent = (int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode)); 217_textHeight = (int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode));
MS\Internal\TextFormatting\TextRunCacheImp.cs (2)
135double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
MS\Internal\TextFormatting\TextStore.cs (2)
2370_settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip), 2375else if (metrics.Width > _settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip))
System\Windows\Media\CharacterMetrics.cs (8)
16using Constants = MS.Internal.TextFormatting.Constants; 305int hash = (int)(_blackBoxWidth * Constants.DefaultRealToIdeal); 306hash = (hash * HashMultiplier) + (int)(_blackBoxHeight * Constants.DefaultRealToIdeal); 307hash = (hash * HashMultiplier) + (int)(_baseline * Constants.DefaultRealToIdeal); 308hash = (hash * HashMultiplier) + (int)(_leftSideBearing * Constants.DefaultRealToIdeal); 309hash = (hash * HashMultiplier) + (int)(_rightSideBearing * Constants.DefaultRealToIdeal); 310hash = (hash * HashMultiplier) + (int)(_topSideBearing * Constants.DefaultRealToIdeal); 311hash = (hash * HashMultiplier) + (int)(_bottomSideBearing * Constants.DefaultRealToIdeal);
System\Windows\Media\FormattedText.cs (2)
2041const double MaxFontEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
System\Windows\Media\textformatting\TextParagraphCache.cs (2)
185return Constants.IdealInfiniteWidth; 189ArgumentOutOfRangeException.ThrowIfGreaterThan(maxLineWidth, Constants.RealInfiniteWidth);