ITextViewLine.GetVirtualBufferPositionFromXCoordinate(Double) Method

Definition

Gets the buffer position of the character whose character bounds contains the given x-coordinate.

C++
public:
 Microsoft::VisualStudio::Text::VirtualSnapshotPoint GetVirtualBufferPositionFromXCoordinate(double xCoordinate);

Parameters

xCoordinate
Double

The x-coordinate of the desired character.

Returns

The text buffer-based point of the character at x

Remarks

If there are no characters at the provided x-coordinate, a point in virtual space will be returned.

If the provided x-coordinate is to the left of the start of the line, the buffer position of the line's left edge will be returned.

Applies to

Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022