Dashboard/Dashboard.BlurgText/BlurgCommand.cs

27 lines
787 B
C#
Raw Normal View History

2024-07-28 10:16:07 +02:00
using BlurgText;
2024-07-28 11:34:22 +02:00
using Dashboard.ImmediateDraw;
using OpenTK.Mathematics;
2024-07-28 10:16:07 +02:00
namespace Dashboard.BlurgText
{
public static class BlurgCommand
{
public static void PutBlurgText(this DrawList list, DashboardBlurg blurg, BlurgResult result, Vector2 origin)
2024-07-28 10:16:07 +02:00
{
for (int i = 0; i < result.Count; i++)
{
BlurgRect rect = result[i];
2024-07-28 13:11:23 +02:00
Rectangle pos = new Rectangle()
2024-07-28 10:16:07 +02:00
{
Min = origin + new Vector2(rect.X, rect.Y),
Size = new Vector2(rect.Width, rect.Height)
2024-07-28 10:16:07 +02:00
};
2024-07-28 13:11:23 +02:00
Rectangle uv = new Rectangle(rect.U1, rect.V1, rect.U0, rect.V0);
2024-07-28 10:16:07 +02:00
list.Image(blurg.Images[(int)rect.UserData], pos, uv);
}
}
}
}