Udostępnij za pośrednictwem


IScrollMap.GetBufferPositionAtCoordinate(Double) Method

Definition

Gets the buffer position that corresponds to a scrollmap coordinate.

public:
 Microsoft::VisualStudio::Text::SnapshotPoint GetBufferPositionAtCoordinate(double coordinate);
public Microsoft.VisualStudio.Text.SnapshotPoint GetBufferPositionAtCoordinate (double coordinate);
abstract member GetBufferPositionAtCoordinate : double -> Microsoft.VisualStudio.Text.SnapshotPoint
Public Function GetBufferPositionAtCoordinate (coordinate As Double) As SnapshotPoint

Parameters

coordinate
Double

The scrollmap coordinate.

Returns

The corresponding buffer position.

Exceptions

coordinate is NaN.

Remarks

Different buffer positions can have the same scroll map coordinates. This method is guaranteed only to be consistent: it will return the same position for the same coordinate. The exact character returned will depend on the implementation of the scroll map. It will generally be the first character on the line.

Applies to