我制作了使用 Otter 绘制文本的方法(使用 SFML.NET 的 2D 游戏渲染库)。但方法不正确,文本未呈现。代码:
public static void DrawText(string Text,string Font,int Size,VXG_Color
clr)
{
Text t = new Text(Text,Font,Size);
t.Color = VXGColor(clr);
t.Render(0f,0f);
t.Visible = true;
}
使用方法:
static void Main(string[] args)
{
DrawText("hello", @"C:\Users\serge\Downloads\DarkDemo\DarkDemo\bin\kongtext.ttf", 72, Rendering.VXG_Color.Orange);
}
方法已执行,未抛出异常,但未呈现,我看不到文本。