画一个圆,添加三种颜色,使得这个圆周能出现三个颜色渐变的效果!代码如下
GraphicsPath myPath;
myPath.AddEllipse(ArcRectOut);
Color colors[] = {
Color.Red,Color.Green,Color.Blue
};
PathGradientBrush pgb(&myPath);
int a = 3;
pgb.SetSurroundColors(colors,&a);
graphics.FillEllipse(&pgb,ArcRectOut);
可是最后显示出来的颜色中第一个和第二个都只是占了整个圆周两三度的范围,大部分都是第三种颜色!
这个是问什么?怎么解决啊?
GraphicsPath myPath;
myPath.AddEllipse(ArcRectOut);
Color colors[] = {
Color.Red,Color.Green,Color.Blue
};
PathGradientBrush pgb(&myPath);
int a = 3;
pgb.SetSurroundColors(colors,&a);
graphics.FillEllipse(&pgb,ArcRectOut);
可是最后显示出来的颜色中第一个和第二个都只是占了整个圆周两三度的范围,大部分都是第三种颜色!
这个是问什么?怎么解决啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货