ITextViewModel.GetNearestPointInVisualSnapshot Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.