Add image brushes as a construct, as well as move some resource types to Common assembly.
This commit is contained in:
parent
e30e50e860
commit
7c3141822a
@ -1,4 +1,5 @@
|
||||
using System.Drawing;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Dashboard.Drawing
|
||||
{
|
||||
@ -10,4 +11,15 @@ namespace Dashboard.Drawing
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user