GDI+的常用类和方法,不用太多,最常用的 初学,最近在考这个,希望高手们能提供点帮助,最好能简短说明一下用途 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=zh-CN&EventID=1032347429&CountryCode=CNhttp://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=zh-CN&EventID=1032347435&CountryCode=CN这有两个关于GDI+的视频 DrawString()//绘制字符串DrawLine()//绘制曲线DrawRectangle//绘制钜形这是常用的 那啥,这个上个周问过了嘛,更深一点的,GraphicsPath之类的上次考了个Matrix完全不知道干吗的,就像这类类 Graphics graphics=this.createGraphics();GraphicsPath MyPath=new GraphicsPath();Pen MyPen=new Pen(Color.red,1);MyPath.AddArc(...);MyPath.AddString(...);MyPath.Rectangle(...);graphics.DrawPath(MyPen,MyPath);使用GraphicsPath类,貌似需要添加using System.Drawing.Drawing2D Graphics里也有很多方法,如transform这类的,求这类惯用的方法,画什么东西就不用说了,反正都是画 『DYlike』的博客首页 博客留言 日志标签 推荐日志 浏览模式: 普通 | 列表 排序方式: 推荐 点击 评论 时间 [默认分类] ColorMix(色彩矩阵)结构 [ 2009-8-15 17:8:48 | 作者: 『DYlike』 ] Dim RC1, RC2 As Rectangle Dim XX As Double Dim IMGTRR As ImageAttributes Private Sub LOADBMP() Dim CM As ColorMatrix = New ColorMatrix(New Single()() _ {New Single() {1, 0, 0, 0, 0}, _ New Single() {0, 1, 0, 0, 0}, _ New Single() {0, 0, 1, 0, 0}, _ New Single() {0, 0, 0, XX / 20, 0}, _ New Single() {0, 0, 0, 0, 1}}) IMGTRR = New ImageAttributes IMGTRR.SetColorMatrix(CM) BMP = New Bitmap(My.Resources.lantianbaiyun2_059) G = Graphics.FromImage(BMP) RC1 = New Rectangle(0, 0, Me.Width, Me.Height) RC2 = New Rectangle(0, 0, My.Resources.C1.Width, My.Resources.C1.Height) G.DrawImage(My.Resources.C1, RC1, 0, 0, RC2.Width, RC2.Height, GraphicsUnit.Pixel, IMGTRR) G.Dispose() BMPS.Add(BMP) Next End SubNew Single() {0, 0, 0, 0, 1}} 最末行第1位:黑色加红(0-1)第2位:黑色加绿(0-1)第3位:黑色加蓝(0-1) ColorMatrix用来干嘛了???不太懂 DrawString()//绘制字符串 DrawLine()//绘制曲线 DrawRectangle//绘制钜形 诶,事忙完了,没什么想要的结果,老老实实研究MSDN吧 这个怎么说呢,不同的需求对于GDI+中的常用的东西也不一样,比如我主要做WINFORM美化,常用切图等方法,还有什么ALPHA通道啊之类,由于自己写的色表比ColorMatrix色彩矩阵性能更高更快,所以就不常用ColorMatrix.你的话题太广了.呵呵. 也是,想想也广,主要是才接触了一个星期,知道的太少,就想有个总结归纳的东西看看,还是看MSDN比较实际 Matrix 是一个矩阵,可以用于图像的转换,如图像的旋转,图像的平移,图像的放大缩小等。。可以和Transform一起使用。 大侠们,求正则表达式 请教c#在wince下如何实现24c02功能? 关于继承的问题 关于命令行参数的问题 .net的反射中如何获取范型类型的名称? dataGrid中改变了一个cell的值,想同时更新另一个cell的值,请问应该在哪个事件中写函数? 怎么得到的值为空啊? VS C# 中的事件列表 !!!深圳软件项目招商!!!http://web.yyccad.com/ .net framework类库引用出了问题,提示List<int>在.net standard中被定义 C#与C++显示图像的区别??? 关于vs2005菜单问题(哪位高人给解决一下)
http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=zh-CN&EventID=1032347435&CountryCode=CN
这有两个关于GDI+的视频
DrawLine()//绘制曲线
DrawRectangle//绘制钜形这是常用的
上次考了个Matrix完全不知道干吗的,就像这类类
Graphics graphics=this.createGraphics();
GraphicsPath MyPath=new GraphicsPath();
Pen MyPen=new Pen(Color.red,1);
MyPath.AddArc(...);
MyPath.AddString(...);
MyPath.Rectangle(...);
graphics.DrawPath(MyPen,MyPath);使用GraphicsPath类,貌似需要添加using System.Drawing.Drawing2D
浏览模式: 普通 | 列表 排序方式: 推荐 点击 评论 时间 [默认分类] ColorMix(色彩矩阵)结构 [ 2009-8-15 17:8:48 | 作者: 『DYlike』 ]
Dim RC1, RC2 As Rectangle
Dim XX As Double
Dim IMGTRR As ImageAttributes
Private Sub LOADBMP()
Dim CM As ColorMatrix = New ColorMatrix(New Single()() _
{New Single() {1, 0, 0, 0, 0}, _
New Single() {0, 1, 0, 0, 0}, _
New Single() {0, 0, 1, 0, 0}, _
New Single() {0, 0, 0, XX / 20, 0}, _
New Single() {0, 0, 0, 0, 1}})
IMGTRR = New ImageAttributes
IMGTRR.SetColorMatrix(CM)
BMP = New Bitmap(My.Resources.lantianbaiyun2_059)
G = Graphics.FromImage(BMP)
RC1 = New Rectangle(0, 0, Me.Width, Me.Height)
RC2 = New Rectangle(0, 0, My.Resources.C1.Width, My.Resources.C1.Height)
G.DrawImage(My.Resources.C1, RC1, 0, 0, RC2.Width, RC2.Height, GraphicsUnit.Pixel, IMGTRR)
G.Dispose()
BMPS.Add(BMP)
Next
End SubNew Single() {0, 0, 0, 0, 1}} 最末行
第1位:黑色加红(0-1)
第2位:黑色加绿(0-1)
第3位:黑色加蓝(0-1)
DrawLine()//绘制曲线
DrawRectangle//绘制钜形
如图像的旋转,图像的平移,图像的放大缩小等。。
可以和Transform一起使用。