Share via


IVerticalFractionMap.GetBufferPositionAtFraction(Double) Method

Definition

Gets the buffer position that corresponds to a fraction of the vertical extent of the view, if it exists.

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

Parameters

fraction
Double

The fraction of the vertical extent of the view.

Returns

The corresponding character position.

Exceptions

fraction is NaN, less than 0.0 or greater than 1.0.

Remarks

Different buffer positions can have the same fractions. This method is guaranteed only to be consistent: it will return the same position for the same fraction. The exact character returned depends on the implementation of the fraction map. It will, generally, be the first character on the line, but this is not guaranteed.

Applies to