첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
본 블로그는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 블로그 콘텐츠 향상을 위해 쓰여집니다.

728x90
반응형
728x170

▶ Gradient 클래스 : Gradient 객체 생성하기 예제

using System.Drawing;
using System.Drawing.Drawing2D;

using Steema.TeeChart.Drawing;

Gradient gradient = CreateGradient(LinearGradientMode.ForwardDiagonal, true, Color.Red, Color.White, Color.Blue, 50);

 

728x90

 

▶ Gradient 클래스 : Gradient 객체 생성하기

using System.Drawing;
using System.Drawing.Drawing2D;

using Steema.TeeChart.Drawing;

#region Gradient 객체 생성하기 - CreateGradient(linearGradientMode, useMiddleColor, startColor, middleColor, endColor, transparency)

/// <summary>
/// Gradient 객체 생성하기
/// </summary>
/// <param name="linearGradientMode">LinearGradientMode 객체</param>
/// <param name="useMiddleColor">중간 색상 사용 여부</param>
/// <param name="startColor">시작 색상</param>
/// <param name="middleColor">중간 색상</param>
/// <param name="endColor">종료 색상</param>
/// <param name="transparency">투명도</param>
/// <returns>Gradient 객체</returns>
public Gradient CreateGradient(LinearGradientMode linearGradientMode, bool useMiddleColor, Color startColor, Color middleColor, Color endColor, int transparency)
{
    Gradient gradient = new Gradient();

    gradient.Visible      = true;
    gradient.Direction    = linearGradientMode;
    gradient.UseMiddle    = useMiddleColor;
    gradient.StartColor   = startColor;

    if(gradient.UseMiddle)
    {
        gradient.MiddleColor = middleColor;
    }

    gradient.EndColor     = endColor;
    gradient.Transparency = transparency;

    return gradient;
}

#endregion
728x90
반응형
그리드형
Posted by 사용자 icodebroker

댓글을 달아 주세요