它可以创建一个贝塞尔半圆Xamarin形成SkiaSharp

它可以创建一个贝塞尔半圆Xamarin形成SkiaSharp,xamarin,xamarin.forms,skiasharp,Xamarin,Xamarin.forms,Skiasharp,嗨,我正试图复制这样的东西 我在这下面的答复,但我不能得到任何接近什么是在图像中 编辑:我正在添加我迄今为止所做的工作,正如您在图像中看到的,当曲线结束时,我无法获得完美的圆 你需要向我们展示你实际使用的代码和你实际得到的结果。我用更多信息编辑了这篇文章。你的贝塞尔曲线的X坐标不是等距的,这似乎是个问题。这可能会有所帮助- private void SKCanvasView_PaintSurface(object sender, SKPaintSurfaceEventArg

嗨,我正试图复制这样的东西

我在这下面的答复,但我不能得到任何接近什么是在图像中

编辑:我正在添加我迄今为止所做的工作,正如您在图像中看到的,当曲线结束时,我无法获得完美的圆


你需要向我们展示你实际使用的代码和你实际得到的结果。我用更多信息编辑了这篇文章。你的贝塞尔曲线的X坐标不是等距的,这似乎是个问题。这可能会有所帮助-

        private void SKCanvasView_PaintSurface(object sender, SKPaintSurfaceEventArgs e)
        {
            SKSurface surface = e.Surface;
            SKCanvas canvas = surface.Canvas;
            canvas.Clear(SKColors.White);

            float canvasWidth = canvas.LocalClipBounds.Width;
            float canvasHeight = canvas.LocalClipBounds.Height;

            using (SKPath bezierPath = new SKPath())
            {
                //Start at bottom
                bezierPath.MoveTo(0, canvasHeight);

                bezierPath.LineTo(0, canvasHeight * 0.6f);

                bezierPath.LineTo(canvasWidth * 0.2f, canvasHeight * 0.6f);

                bezierPath.CubicTo(canvasWidth * 0.4f, canvasHeight * 0.6f,
                                   canvasWidth * 0.5f, canvasHeight * 0f,
                                   canvasWidth * 0.8f, canvasHeight * 0.6f);

                bezierPath.LineTo(canvasWidth, canvasHeight * 0.6f);
                bezierPath.LineTo(canvasWidth, canvasHeight);

                bezierPath.Close();

                canvas.DrawPath(bezierPath, _paint);
            }
        }