|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
using Unity.UIWidgets.foundation; |
|
|
|
using Unity.UIWidgets.service; |
|
|
|
using Unity.UIWidgets.ui; |
|
|
|
|
|
|
|
|
|
|
namespace Unity.UIWidgets.painting { |
|
|
|
|
|
|
|
class _CaretMetrics { |
|
|
|
public _CaretMetrics(Offset offset, float? fullHeight) { |
|
|
|
this.offset = offset; |
|
|
|
|
|
|
public Offset offset; |
|
|
|
public float? fullHeight; |
|
|
|
} |
|
|
|
|
|
|
|
public class TextPainter { |
|
|
|
TextSpan _text; |
|
|
|
TextAlign _textAlign; |
|
|
|
|
|
|
if (position == this._previousCaretPosition && caretPrototype == this._previousCaretPrototype) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var offset = position.offset; |
|
|
|
Rect rect; |
|
|
|
switch (position.affinity) { |
|
|
|