Compartilhar via


IWpfTextViewLineCollection.GetTextMarkerGeometry Method

Definition

Overloads

GetTextMarkerGeometry(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.

GetTextMarkerGeometry(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.

GetTextMarkerGeometry(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.

public:
 System::Windows::Media::Geometry ^ GetTextMarkerGeometry(Microsoft::VisualStudio::Text::SnapshotSpan bufferSpan);
public System.Windows.Media.Geometry GetTextMarkerGeometry (Microsoft.VisualStudio.Text.SnapshotSpan bufferSpan);
abstract member GetTextMarkerGeometry : Microsoft.VisualStudio.Text.SnapshotSpan -> System.Windows.Media.Geometry
Public Function GetTextMarkerGeometry (bufferSpan As SnapshotSpan) As Geometry

Parameters

bufferSpan
SnapshotSpan

The span of text.

Returns

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

bufferSpan is not a valid SnapshotSpan on 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 text glyphs (TextHeight) to calculate the height of the geometry on each line.

This method adds a 1-pixel padding to bottom of the geometries.

The returned geometry is not clipped to the boundaries of the viewport.

Applies to

GetTextMarkerGeometry(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.

public:
 System::Windows::Media::Geometry ^ GetTextMarkerGeometry(Microsoft::VisualStudio::Text::SnapshotSpan bufferSpan, bool clipToViewport, System::Windows::Thickness padding);
public System.Windows.Media.Geometry GetTextMarkerGeometry (Microsoft.VisualStudio.Text.SnapshotSpan bufferSpan, bool clipToViewport, System.Windows.Thickness padding);
abstract member GetTextMarkerGeometry : Microsoft.VisualStudio.Text.SnapshotSpan * bool * System.Windows.Thickness -> System.Windows.Media.Geometry
Public Function GetTextMarkerGeometry (bufferSpan As SnapshotSpan, clipToViewport As Boolean, padding As Thickness) As Geometry

Parameters

bufferSpan
SnapshotSpan

The span of text.

clipToViewport
Boolean

If true, the created geometry will be clipped to the viewport.

padding
Thickness

A padding that's applied to the elements on a per line basis.

Returns

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

bufferSpan is not a valid SnapshotSpan on 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 text glyphs (TextHeight) to calculate the height of the geometry on each line.

Applies to