praeclarum / NGraphics

NGraphics is a cross platform library for rendering vector graphics on .NET. It provides a unified API for both immediate and retained mode graphics using high quality native renderers.
MIT License
705 stars 133 forks source link

Fill Path with curve not working on ios #96

Closed NikiNic closed 5 years ago

NikiNic commented 5 years ago

Hi @praeclarum eclarum , I'm working on Xamarin.Forms where i'm using NControl Fill Path method for drawing a semicircle kind of structure . It is working perfectly on android but in ios, it shows a straight line instead of a curve. I have tried drawing other structures and they seem to work but i'm not able to draw curve on ios. Please help me out with this issue.

Below is my PCL #code for drawing a semicircle

DrawingFunction = (canvas, rect) => { canvas.FillPath(new PathOp[] { new MoveTo ( new NGraphics.Point(0,rect.Height)), new CurveTo (new NGraphics.Point(0,rect.Height),new NGraphics.Point(rect.Width/2,rect.Height+50),new NGraphics.Point(rect.Width,rect.Height)), new MoveTo(NGraphics.Point.Zero), }, new NGraphics.Color(FillColor.R, FillColor.G, FillColor.B)); }

NikiNic commented 5 years ago

[Solved] i found out the solution. In iOS if we specify a particular height and width to a control it does not draw beyond that height and width. So we have to draw everything inside that.