A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 lines
1.3 KiB

// -----------------------------------------------------------------------
// <copyright file="SolidColorBrush.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Media
{
/// <summary>
/// Fills an area with a solid color.
/// </summary>
public class SolidColorBrush : Brush
{
/// <summary>
/// Initializes a new instance of the <see cref="SolidColorBrush"/> class.
/// </summary>
/// <param name="color">The color to use.</param>
public SolidColorBrush(Color color)
{
this.Color = color;
}
/// <summary>
/// Initializes a new instance of the <see cref="SolidColorBrush"/> class.
/// </summary>
/// <param name="color">The color to use.</param>
public SolidColorBrush(uint color)
: this(Color.FromUInt32(color))
{
}
/// <summary>
/// Gets the color of the brush.
/// </summary>
public Color Color
{
get;
private set;
}
public override string ToString()
{
return this.Color.ToString();
}
}
}