Xamarin 畫圓

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章