コード例 #1
0
            public SnapshotPoint?GetBufferPositionFromXCoordinate(double xCoordinate, bool textOnly)
            {
                var y   = textEditor.LocationToPoint(textEditor.OffsetToLocation(lineSpan.Start)).Y;
                var loc = textEditor.PointToLocation(xCoordinate, y);

                return(Snapshot.GetSnapshotPoint(loc.Line, loc.Column));
            }
コード例 #2
0
            public SnapshotPoint?GetBufferPositionFromXCoordinate(double xCoordinate, bool textOnly)
            {
                var y   = textEditor.LocationToPoint(textEditor.OffsetToLocation(lineSpan.Start)).Y;
                var loc = textEditor.PointToLocation(xCoordinate, y);
                var pos = textEditor.LocationToOffset(loc);

                return(new SnapshotPoint(Snapshot, pos));
            }