Add image brushes as a construct, as well as move some resource types to Common assembly.
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user