我的问题是:文本不显示在画布上
SKPaint _paint = new SKPaint();
using(Stream stream = _assembly.GetManifestResourceStream(fontPath))
{
_paint.Typeface = SKTypeface.FromStream(stream);
}
canvas.DrawText ("12345",X,Y,_paint);
如果我不使用“使用块”或“处置”,它就像一个魅力。
但是如果我这样做了,在它到达 canvas.DrawText 之前,_paint 不会为空,但 FontMetrics、FontSpacing 或 TextSize 中的所有值都等于 0。
然后画布上没有文字。
我很困惑,请你给我一些建议好吗?
谢谢你。