57 references to Constants
PresentationCore (57)
Core\CSharp\MS\Internal\FontFace\CompositeFontParser.cs (8)
42else if (value > Constants.GreatestMutiplierOfEm) 44value = Constants.GreatestMutiplierOfEm; 46else if (value < -Constants.GreatestMutiplierOfEm) 48value = -Constants.GreatestMutiplierOfEm; 58else if (value > Constants.GreatestMutiplierOfEm) 60value = Constants.GreatestMutiplierOfEm; 74else if (value > Constants.GreatestMutiplierOfEm) 76value = Constants.GreatestMutiplierOfEm;
Core\CSharp\MS\Internal\TextFormatting\FormatSettings.cs (4)
64_maxLineWidth = Constants.IdealInfiniteWidth; 165return _pap.Wrap ? finiteFormatWidth : Constants.IdealInfiniteWidth; 176int formatWidth = (paragraphWidth <= 0 ? Constants.IdealInfiniteWidth : paragraphWidth); 181formatWidth = Math.Min(formatWidth, Constants.IdealInfiniteWidth);
Core\CSharp\MS\Internal\TextFormatting\FullTextState.cs (1)
117Constants.IdealInfiniteWidth // formatWidth
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (8)
492lstTextMetrics.dvAscent = (int)Math.Round(typeface.Baseline(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 493lstTextMetrics.dvMultiLineHeight = (int)Math.Round(typeface.LineSpacing(store.Pap.EmSize, Constants.DefaultIdealToReal, store.Settings.TextSource.PixelsPerDip, fullText.TextFormattingMode)); 2035(int)(lsrun.EmSize * Constants.MinInterWordCompressionPerEm), 2090(int)(lsrun.EmSize * Constants.MaxInterWordExpansionPerEm), 2149pplsAdjustRight[1][i] = expandedBy * Constants.AcceptableLineStretchability; 2203(int)(em * Constants.MinInterWordCompressionPerEm), 2339(int)(em * Constants.MaxInterWordExpansionPerEm), 2433pplsExpansionRight[1][igi + i] = expandedBy * Constants.AcceptableLineStretchability;
Core\CSharp\MS\Internal\TextFormatting\SimpleTextLine.cs (2)
339_height = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip); 340_baselineOffset = formatter.IdealToReal((int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, PixelsPerDip, _settings.TextFormattingMode)), PixelsPerDip);
Core\CSharp\MS\Internal\TextFormatting\TextFormatterImp.cs (13)
492|| paragraphWidth > Constants.RealInfiniteWidth) 494throw new ArgumentOutOfRangeException("paragraphWidth", SR.Get(SRID.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); 497double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm; 505if (paragraphProperties.Indent > Constants.RealInfiniteWidth) 506throw new ArgumentOutOfRangeException("paragraphProperties.Indent", SR.Get(SRID.ParameterCannotBeGreaterThan, Constants.RealInfiniteWidth)); 508if (paragraphProperties.LineHeight > Constants.RealInfiniteWidth) 509throw new ArgumentOutOfRangeException("paragraphProperties.LineHeight", SR.Get(SRID.ParameterCannotBeGreaterThan, Constants.RealInfiniteWidth)); 512|| paragraphProperties.DefaultIncrementalTab > Constants.RealInfiniteWidth) 514throw new ArgumentOutOfRangeException("paragraphProperties.DefaultIncrementalTab", SR.Get(SRID.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth)); 728return i * Constants.DefaultIdealToReal; 745value = Math.Max(value, Constants.DefaultIdealToReal); 791get { return Constants.DefaultRealToIdeal; }
Core\CSharp\MS\Internal\TextFormatting\TextMetrics.cs (4)
213* pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 214/ pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode) 222_textAscent = (int)Math.Round(pap.DefaultTypeface.Baseline(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode)); 223_textHeight = (int)Math.Round(pap.DefaultTypeface.LineSpacing(pap.EmSize, Constants.DefaultIdealToReal, _pixelsPerDip, fullText.TextFormattingMode));
Core\CSharp\MS\Internal\TextFormatting\TextRunCacheImp.cs (2)
141double realMaxFontRenderingEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
Core\CSharp\MS\Internal\TextFormatting\TextStore.cs (2)
2380_settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip), 2385else if (metrics.Width > _settings.Formatter.IdealToReal((Constants.IdealInfiniteWidth - currentPosition), _settings.TextSource.PixelsPerDip))
Core\CSharp\System\Windows\Media\CharacterMetrics.cs (8)
18using Constants = MS.Internal.TextFormatting.Constants; 309int hash = (int)(_blackBoxWidth * Constants.DefaultRealToIdeal); 310hash = (hash * HashMultiplier) + (int)(_blackBoxHeight * Constants.DefaultRealToIdeal); 311hash = (hash * HashMultiplier) + (int)(_baseline * Constants.DefaultRealToIdeal); 312hash = (hash * HashMultiplier) + (int)(_leftSideBearing * Constants.DefaultRealToIdeal); 313hash = (hash * HashMultiplier) + (int)(_rightSideBearing * Constants.DefaultRealToIdeal); 314hash = (hash * HashMultiplier) + (int)(_topSideBearing * Constants.DefaultRealToIdeal); 315hash = (hash * HashMultiplier) + (int)(_bottomSideBearing * Constants.DefaultRealToIdeal);
Core\CSharp\System\Windows\Media\FormattedText.cs (2)
2058const double MaxFontEmSize = Constants.RealInfiniteWidth / Constants.GreatestMutiplierOfEm;
Core\CSharp\System\Windows\Media\TextFormatting\TextParagraphCache.cs (3)
200return Constants.IdealInfiniteWidth; 204|| maxLineWidth > Constants.RealInfiniteWidth) 206throw new ArgumentOutOfRangeException("maxLineWidth", SR.Get(SRID.ParameterMustBeBetween, 0, Constants.RealInfiniteWidth));