Source/AdvTree/Drawing/ColorStop.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Drawing;
using System.ComponentModel;
namespace DevComponents.WinForms.Drawing
{
/// <summary>
/// Defines single color blend point for the multicolor gradient fills.
/// </summary>
[ToolboxItem(false), DesignTimeVisible(false), TypeConverter(typeof(ColorStopConverter))]
public class ColorStop
{
#region Private Variables
private Color _Color = Color.Empty;
private float _Position = 0;
#endregion
#region Internal Implementation
/// <summary>
/// Creates new instance of the class. When defining multicolor gradient blends and using the percentage positions the positions created
/// must start with 0f and end with 1f.
/// </summary>
public ColorStop() { }
/// <summary>
/// Creates new instance of the class and initialize it with default values.
/// </summary>
public ColorStop(Color color, float position)
{
_Color = color;
_Position = position;
}
///// <summary>
///// Creates new instance of the class and initialize it with default values.
///// </summary>
//public ColorStop(int color, float position)
//{
// _Color = ColorScheme.GetColor(color);
// _Position = position;
//}
/// <summary>
/// Gets or sets Color to use in multicolor gradient blend at specified position.
/// </summary>
[Browsable(true), Description("Indicates the Color to use in multicolor gradient blend at specified position.")]
public Color Color
{
get { return _Color; }
set
{
_Color = value;
OnColorBlendChanged();
}
}
private bool ShouldSerializeColor()
{
return !_Color.IsEmpty;
}
后面还有 23 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。