首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

怎么定义圆形渐变(中间——边缘渐变)画笔,类似Photoshop里的画笔工具

2012-02-16 
如何定义圆形渐变(中间——边缘渐变)画笔,类似Photoshop里的画笔工具如何定义圆形渐变(中间——边缘渐变)画笔,

如何定义圆形渐变(中间——边缘渐变)画笔,类似Photoshop里的画笔工具
如何定义圆形渐变(中间——边缘渐变)画笔,类似Photoshop里的画笔工具

[解决办法]
今天早上的目的是把0回复的顶起来
[解决办法]
有个叫PaintDotNet的C#开源项目,类似Photoshop,楼主可以去搜搜参考一下
[解决办法]
帮你顶
[解决办法]
http://download.csdn.net/source/167724
[解决办法]
下面的示例用路径渐变画笔填充椭圆。中心的颜色设置为蓝色;边界的颜色设置为浅绿色。

C# code
// Create a path that consists of a single ellipse. 
GraphicsPath path = new GraphicsPath();
path.AddEllipse(0, 0, 140, 70);

// Use the path to construct a brush.
PathGradientBrush pthGrBrush = new PathGradientBrush(path);

// Set the color at the center of the path to blue.
pthGrBrush.CenterColor = Color.FromArgb(255, 0, 0, 255);

// Set the color along the entire boundary
// of the path to aqua.
Color[] colors = {Color.FromArgb(255, 0, 255, 255)};
pthGrBrush.SurroundColors = colors;

e.Graphics.FillEllipse(pthGrBrush, 0, 0, 140, 70);

[解决办法]
使用PathGradientBrush
看一下Programming Microsoft Windows with CSharp第17章
[解决办法]
路径渐变,在周鸣扬写的GDI+的程序设计中讲的比较清楚。

热点排行