Source/Presentation/ShapeBorder.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Text;
using System.Drawing;
using DevComponents.DotNetBar.Rendering;

namespace DevComponents.DotNetBar.Presentation
{
    /// <summary>
    /// Defines the shape border.
    /// </summary>
    internal class ShapeBorder
    {
        #region Properties
        /// <summary>
        /// Gets or sets the border width in pixels.
        /// </summary>
        public int Width = 0;

        /// <summary>
        /// Gets or sets the border color.
        /// </summary>
        public Color Color1 = Color.Empty;

        /// <summary>
        /// Gets or sets the ending gradient border color.
        /// </summary>
        public Color Color2 = Color.Empty;

        /// <summary>
        /// Gets or sets the gradient angle. Default value is 90.
        /// </summary>
        public int GradientAngle = 90;
        #endregion

        #region Internal Implementation
        public ShapeBorder() {}
        public ShapeBorder(int borderWidth) { Width = borderWidth; }
        public ShapeBorder(LinearGradientColorTable table)
        {
            this.Color1 = table.Start;
            this.Color2 = table.End;
            this.Width = 1;
        }
        public ShapeBorder(LinearGradientColorTable table, int width)
        {
            this.Color1 = table.Start;
            this.Color2 = table.End;
            this.Width = width;
        }
        public void Apply(LinearGradientColorTable table)
        {
            if (table == null)
            {
                this.Color1 = Color.Empty;
                this.Color2 = Color.Empty;
            }
            else
            {
                this.Color1 = table.Start;
                this.Color2 = table.End;
后面还有 17 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。