IWpfTextViewLineCollection.GetLineMarkerGeometry Method (SnapshotSpan, Boolean, Thickness)

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)

Syntax

声明
Function GetLineMarkerGeometry ( _
    bufferSpan As SnapshotSpan, _
    clipToViewport As Boolean, _
    padding As Thickness _
) As Geometry
Geometry GetLineMarkerGeometry(
    SnapshotSpan bufferSpan,
    bool clipToViewport,
    Thickness padding
)
Geometry^ GetLineMarkerGeometry(
    SnapshotSpan bufferSpan, 
    bool clipToViewport, 
    Thickness padding
)
abstract GetLineMarkerGeometry : 
        bufferSpan:SnapshotSpan * 
        clipToViewport:bool * 
        padding:Thickness -> Geometry 
function GetLineMarkerGeometry(
    bufferSpan : SnapshotSpan, 
    clipToViewport : boolean, 
    padding : Thickness
) : Geometry

Parameters

  • clipToViewport
    Type: System.Boolean
    If true, the created geometry will be clipped to the viewport.

Return Value

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.

Exceptions

Exception Condition
ArgumentOutOfRangeException

bufferSpan is not a valid SnapshotSpan o the buffer.

Remarks

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 line (Height) to calculate the height of the geometry on each line.

.NET Framework Security

See Also

Reference

IWpfTextViewLineCollection Interface

GetLineMarkerGeometry Overload

Microsoft.VisualStudio.Text.Editor Namespace