IWpfTextViewLineCollection.GetTextMarkerGeometry Method (SnapshotSpan)
Gets the text marker geometry for the specified range of text in the buffer by using a polygonal approximation algorithm to calculate the outline path of the text regions.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)
声明
Function GetTextMarkerGeometry ( _
bufferSpan As SnapshotSpan _
) As Geometry
Geometry GetTextMarkerGeometry(
SnapshotSpan bufferSpan
)
Geometry^ GetTextMarkerGeometry(
SnapshotSpan bufferSpan
)
abstract GetTextMarkerGeometry :
bufferSpan:SnapshotSpan -> Geometry
function GetTextMarkerGeometry(
bufferSpan : SnapshotSpan
) : Geometry
- bufferSpan
Type: Microsoft.VisualStudio.Text.SnapshotSpan
The span of text.
Type: System.Windows.Media.Geometry
A Geometry that contains the bounds of all of the formatted text in the span. It is null if the span is empty or does not intersect the text formatted in the ITextView.
Exception | Condition |
---|---|
ArgumentOutOfRangeException | bufferSpan is not a valid SnapshotSpan on the buffer. |
The returned geometry may contain several disjoint regions if the span contains a mix of conventional and bi-directional text. This method uses the height of the rendered text glyphs (TextHeight) to calculate the height of the geometry on each line. This method adds a one-pixel padding to the bottom of the geometries. The returned geometry is not clipped to the boundaries of the viewport.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
IWpfTextViewLineCollection Interface