您的位置:首页 > 其它

Xamarin 画圆

2016-06-01 19:36 295 查看
//// Oval Drawing   画园
var ovalPath = UIBezierPath.FromOval(new
CGRect(51.0f, 66.0f,
37.0f, 36.0f));
UIColor.Gray.SetFill();
ovalPath.Fill();

//// Star Drawing  画星星
UIBezierPath starPath = new
UIBezierPath();
starPath.MoveTo(new CGPoint(108.0f,
68.25f));
starPath.AddLineTo(new CGPoint(113.38f,
76.35f));
starPath.AddLineTo(new CGPoint(122.5f,
79.13f));
starPath.AddLineTo(new CGPoint(116.7f,
86.92f));
starPath.AddLineTo(new CGPoint(116.96f,
96.74f));
starPath.AddLineTo(new CGPoint(108.0f,
93.45f));
starPath.AddLineTo(new CGPoint(99.04f,
96.74f));
starPath.AddLineTo(new CGPoint(99.3f,
86.92f));
starPath.AddLineTo(new CGPoint(93.5f,
79.13f));
starPath.AddLineTo(new CGPoint(102.62f,
76.35f));
starPath.ClosePath();
UIColor.Gray.SetFill();
starPath.Fill();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: