2016-04-05 11 views
0

私は四角形を描いています。問題 - コーナーがシャープではありません。この問題の解決策はありますか?コアグラフィックスの丸い角が鋭くない

Zoom 100%

Zoomed in

ここに私の描画コード(Xamarin)あなたの代わりcornerradiusを使用していないのはなぜ

var thickness = (nfloat)Math.Min (Math.Min (_renderer.View.Thickness.Left, _renderer.View.Thickness.Right), Math.Max (_renderer.View.Thickness.Top, _renderer.View.Thickness.Bottom)); 
var path = UIBezierPath.FromRoundedRect (new CGRect(this.Bounds.X + thickness/2, this.Bounds.Y + thickness/2, this.Bounds.Width - thickness, this.Bounds.Height - thickness), (nfloat)_renderer.View.CornerRadius); 

context.SetShouldAntialias (true); 
context.SetStrokeColor (_renderer.View.Color.ToCGColor()); 
context.SetFillColor (_renderer.View.BackgroundColor.ToCGColor()); 
path.LineWidth = thickness; 

path.Fill(); 
path.Stroke(); 
+0

実際のデバイスとiOSシミュレータを比較しようとしましたか?あなたはまた、この答えを見てください:http://stackoverflow.com/a/2181479/4984832 – SushiHangover

答えて

0

はありますか?

Btwでは、レイヤーのスケールプロパティをチェックする必要があります。メインビュースケールと同じ値に設定する必要があります(例:網膜デバイスでは2)。デフォルトでは1です。