SKCanvas.DrawCircle () рисует квадраты - PullRequest
0 голосов
/ 05 декабря 2018

Я устанавливаю SkiaSharp в .NetCore, используя OpenGL.Если я вызываю функцию DrawCircle () , она визуализирует квадраты, что кажется странным.Мой код выглядит так:

using (SKPaint paint = new SKPaint {
    Style = SKPaintStyle.Stroke,
    Color = SKColors.Red,
    StrokeWidth = 25,
}) {
    canvas.RotateDegrees( 2 );
    canvas.DrawCircle( info.Width / 2, info.Height / 2, 100, paint );
    paint.Style = SKPaintStyle.Fill;
    paint.Color = SKColors.Blue;
    canvas.DrawCircle( info.Width / 2, info.Height / 2, 75, paint );

    canvas.RotateDegrees( 20 );
    canvas.DrawCircle( info.Width / 2, info.Height / 2, 50, paint );
    paint.Style = SKPaintStyle.Fill;
    paint.Color = SKColors.Yellow;
    canvas.DrawCircle( info.Width / 2, info.Height / 2, 25, paint );

}

Экран выглядит так: enter image description here

Почему существуют квадраты?

1 Ответ

0 голосов
/ 05 декабря 2018

Поэтому я случайно исправил эту проблему, добавив антиалиасинг.

using (SKPaint paint = new SKPaint {
     ...,
     ...,
     IsAntialias = true
}) {
     ...
}

enter image description here

...