大佬教程收集整理的这篇文章主要介绍了Silverlight 引路蜂二维图形库示例:路径,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
引路蜂二维图形库也提供了对一般路径的支持,可以同过线段,二次曲线,三次曲线组成路径,也可以根据SVG指令来定义路径。
private void Paths() { AffineTransform mat1; /* The path. */ Path path; /** Colors */ Color redColor = new Color(0x96ff0000,truE); Color greenColor = new Color(0xff00ff00,falsE); Color blueColor = new Color(0x750000ff,truE); String pathdata = "M 60 20 Q -40 70 60 120 Q 160 70 60 20 z"; mat1 = new AffineTransform(); mat1.Translate(30,40); mat1.Rotate(-30 * Math.PI / 180.0); path = Path.FromString(pathdata); //Clear the canvas with white color. graphics2D.Reset(); graphics2D.Clear(Color.WhitE); graphics2D.AffineTransform = new AffineTransform(); SolidBrush brush = new SolidBrush(greenColor); graphics2D.Fill(brush,path); graphics2D.AffineTransform = mat1; brush = new SolidBrush(blueColor); Pen pen = new Pen(redColor,5); graphics2D.SetPenAndBrush(pen,brush); graphics2D.Draw(null,path); graphics2D.Fill(null,path); }
以上是大佬教程为你收集整理的Silverlight 引路蜂二维图形库示例:路径全部内容,希望文章能够帮你解决Silverlight 引路蜂二维图形库示例:路径所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。