■ ChartBrush 클래스를 사용해 그라디언트 ChartBrush 객체를 생성하는 방법을 보여준다.
▶ ChartBrush 클래스 : 그라디언트 ChartBrush 객체 생성하기 예제 (C#)
1 2 3 4 5 6 7 8 |
using System.Drawing; using System.Drawing.Drawing2D; using Steema.TeeChart.Drawing; ChartBrush chartBrush = CreateGradientChartBrush(LinearGradientMode.ForwardDiagonal, true, Color.Red, Color.White, Color.Blue, 50); |
▶ ChartBrush 클래스 : 그라디언트 ChartBrush 객체 생성하기 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
using System.Drawing; using System.Drawing.Drawing2D; using Steema.TeeChart.Drawing; #region 그라디언트 ChartBrush 객체 생성하기 - CreateGradientChartBrush(linearGradientMode, useMiddleColor, startColor, middleColor, endColor, transparency) /// <summary> /// 그라디언트 ChartBrush 객체 생성하기 /// </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>ChartBrush 객체</returns> public ChartBrush CreateGradientChartBrush(LinearGradientMode linearGradientMode, bool useMiddleColor, Color startColor, Color middleColor, Color endColor, int transparency) { Gradient gradient = CreateGradient(linearGradientMode, useMiddleColor, startColor, middleColor, endColor, transparency); // 'Gradient 클래스 : Gradient 객체 생성하기' 참조 ChartBrush chartBrush = new ChartBrush(); chartBrush.Gradient = gradient; return chartBrush; } #endregion |