using RGB.NET.Core;
namespace Artemis.Core;
internal class SKTextureBrush : AbstractBrush
{
#region Constructors
///
/// Initializes a new instance of the class.
///
/// The texture drawn by this brush.
public SKTextureBrush(SKTexture? texture)
{
Texture = texture;
}
#endregion
#region Methods
///
protected override Color GetColorAtPoint(Rectangle rectangle, RenderTarget renderTarget)
{
return Texture?.GetColorAtRenderTarget(renderTarget) ?? Color.Transparent;
}
#endregion
#region Properties & Fields
private SKTexture? _texture;
///
/// Gets or sets the texture drawn by this brush.
///
public SKTexture? Texture
{
get => _texture;
set => SetProperty(ref _texture, value);
}
#endregion
}