Add image brushes as a construct, as well as move some resource types to Common assembly.

This commit is contained in:
2026-01-05 22:34:34 +03:00
parent e30e50e860
commit 7c3141822a
3 changed files with 12 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using System.Drawing; using System.Drawing;
using System.Numerics;
namespace Dashboard.Drawing namespace Dashboard.Drawing
{ {
@@ -10,4 +11,15 @@ namespace Dashboard.Drawing
{ {
public Color Color { get; } = color; public Color Color { get; } = color;
} }
public class ImageBrush(Image image) : Brush
{
public Box2d TextureCoordinates { get; set; } = new Box2d(0, 0, 1, 1);
}
public class NinePatchImageBrush(Image image) : Brush
{
public Box2d CenterCoordinates { get; set; } = new Box2d(0, 0, 1, 1);
public Vector4 Extents { get; set; } = Vector4.Zero;
}
} }