Hi All,
I am currently in the process of porting a visual WPF application to a cloud framework and using Unity as the main canvas element. Within my application the user can draw primitive and complex shapes on the canvas, we do this using StreamGeometryContext from Microsoft. Below is some basic drawing code that allows us to draw a curved path.
ctx.BeginFigure(startEnd.GetPoint(), true, false);
ctx.LineTo(startBeginning.GetPoint(), true, true);
ctx.ArcTo(endBeginning.GetPoint(), outerEllipseSize, 0, false, startEllipseDirection, true, true);
ctx.LineTo(endEnd.GetPoint(), true, false);
ctx.ArcTo(startEnd.GetPoint(), innerEllipseSize, 0, false, endEllipseDirection, true, true);
In unity I am using a LineRenderer to draw our primitive shapes and am having lots of success using it and am finding it quite easy to port across our legacy code. However I can not seem to find a suitable replacement For DrawArc, specifically this line
ctx.ArcTo(endBeginning.GetPoint(), outerEllipseSize, 0, false, startEllipseDirection, true, true);
ArcTo takes the following parameters
Point point,
Size size,
double rotationAngle,
bool isLargeArc,
SweepDirection sweepDirection,
bool isStroked,
bool isSmoothJoin
Would anyone be able to point me in the direction on how I could achieve the same effect as Microsoft’s ArcTo method in unity?
Thanks in advance