Compartilhar via


ITextViewModel.GetNearestPointInVisualSnapshot Method

Definition

Gets a point in the VisualBuffer that corresponds to the specified point in the edit buffer. If the point is hidden or has an alternative representation, gets the nearest point to it.

public:
 Microsoft::VisualStudio::Text::SnapshotPoint GetNearestPointInVisualSnapshot(Microsoft::VisualStudio::Text::SnapshotPoint editBufferPoint, Microsoft::VisualStudio::Text::ITextSnapshot ^ targetVisualSnapshot, Microsoft::VisualStudio::Text::PointTrackingMode trackingMode);
public Microsoft.VisualStudio.Text.SnapshotPoint GetNearestPointInVisualSnapshot (Microsoft.VisualStudio.Text.SnapshotPoint editBufferPoint, Microsoft.VisualStudio.Text.ITextSnapshot targetVisualSnapshot, Microsoft.VisualStudio.Text.PointTrackingMode trackingMode);
abstract member GetNearestPointInVisualSnapshot : Microsoft.VisualStudio.Text.SnapshotPoint * Microsoft.VisualStudio.Text.ITextSnapshot * Microsoft.VisualStudio.Text.PointTrackingMode -> Microsoft.VisualStudio.Text.SnapshotPoint
Public Function GetNearestPointInVisualSnapshot (editBufferPoint As SnapshotPoint, targetVisualSnapshot As ITextSnapshot, trackingMode As PointTrackingMode) As SnapshotPoint

Parameters

editBufferPoint
SnapshotPoint

A point in the EditBuffer.

targetVisualSnapshot
ITextSnapshot

The snapshot of VisualBuffer to map to.

trackingMode
PointTrackingMode

The PointTrackingMode to use when translating to targetVisualSnapshot.

Returns

A point in the VisualBuffer that corresponds to the given point in targetVisualSnapshot.

Remarks

The definition of "nearest" depends on the implementation of the text view model.

Applies to