아마도 FormattedText.BuildGeometry Method
또는 FormattedText.BuildHighlightGeometry Method
을 찾고있을 것입니다. 두 MSDN 링크는 일반적인 예제도 제공합니다.
// Create sample formatted text.
FormattedText formattedText = new FormattedText("Sample",
CultureInfo.GetCultureInfo("en-us"), FlowDirection.LeftToRight,
new Typeface("Verdana"), 16, System.Windows.Media.Brushes.Black);
// Build geometry object that represents the text.
Geometry normalGeometry = formattedText.BuildGeometry(
new System.Windows.Point(0, 0));
// Build geometry object that represents the highlight bounding box of the text.
Geometry highLightGeometry = formattedText.BuildHighlightGeometry(
new System.Windows.Point(0, 0));
:
기본 사용 패턴과 같이이다