Source/AdvTree/Drawing/SolidFill.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Drawing;
using System.ComponentModel;
namespace DevComponents.WinForms.Drawing
{
public class SolidFill : Fill
{
#region Constructor
/// <summary>
/// Initializes a new instance of the SolidFill class.
/// </summary>
/// <param name="color"></param>
public SolidFill(Color color)
{
_Color = color;
}
/// <summary>
/// Initializes a new instance of the SolidFill class.
/// </summary>
public SolidFill()
{
}
#endregion
#region Internal Implementation
/// <summary>
/// Creates the brush for fill.
/// </summary>
/// <param name="bounds">Bounds for the brush</param>
/// <returns>Returns brush or null if brush cannot be created for given bounds or colors are not set. It is responsibility of caller to Dispose the brush.</returns>
public override Brush CreateBrush(Rectangle bounds)
{
if (_Color.IsEmpty) return null;
return new SolidBrush(_Color);
}
private Color _Color = Color.Empty;
/// <summary>
/// Gets or sets the fill color.
/// </summary>
[Description("Indicates the fill color.")]
public Color Color
{
get { return _Color; }
set { _Color = value; }
}
/// <summary>
/// Gets whether property should be serialized.
/// </summary>
/// <returns>true if property should be serialized</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool ShouldSerializeColor()
{
return !_Color.IsEmpty;
}
/// <summary>
/// Sets the property to its default value.
后面还有 16 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。