getTextPaint method
获取文本高度
Implementation
TextPainter getTextPaint(String? text, TextStyle style,
{Size? size, TextPainter? linePaint}) {
if (text == null) text = "";
if (linePaint == null) {
linePaint = TextPainter(
textDirection: TextDirection.ltr,
);
}
linePaint.textAlign = lyricPaint.lyricUI.getLyricTextAligin();
linePaint
..text = TextSpan(text: text, style: style)
..layout(maxWidth: (size ?? mSize).width);
return linePaint;
}