关闭

Xamarin 画圆

138人阅读 评论(0) 收藏 举报
分类:

//// 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();

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:37678次
    • 积分:855
    • 等级:
    • 排名:千里之外
    • 原创:47篇
    • 转载:14篇
    • 译文:1篇
    • 评论:1条
    最新评论