SVGMeshUnity.Internals.BezierToVertex.FillBezier(UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2)

Here are the examples of the csharp api SVGMeshUnity.Internals.BezierToVertex.FillBezier(UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : BezierToVertex.cs
License : MIT License
Project Creator : FaizanDurrani

public void GetContours(SVGData svg, MeshData data)
        {
            WorkBufferPool.Get(ref WorkVertices);
            
            var pen = Vector2.zero;
            
            var curves = svg.Curves;
            var l = curves.Count;
            for (var i = 0; i < l; ++i)
            {
                var curve = curves[i];
                if (curve.IsMove)
                {
                    EmitWorkVerticesIfNeeded(data);
                }
                else
                {
                    FillBezier(pen, curve.InControl, curve.OutControl, curve.Position);
                }
                pen = curve.Position;
            }
            
            EmitWorkVerticesIfNeeded(data);
            
            WorkBufferPool.Release(ref WorkVertices);
        }