示例#1
0
        //------------------------------------

        public VertexStore ParseSvgPathDefinitionToVxs(char[] buffer)
        {
            //
            VectorToolBox.GetFreePathWriter(out PathWriter pathWriter);
            VectorToolBox.GetFreeVxs(out VertexStore flattenVxs);

            _svgPathDataParser.SetPathWriter(pathWriter);
            //tokenize the path definition data
            _svgPathDataParser.Parse(buffer);


            _curveFlattener.MakeVxs(pathWriter.Vxs, flattenVxs);
            //-------------------------------------------------

            //create a small copy of the vxs
            VertexStore vxs = flattenVxs.CreateTrim();

            VectorToolBox.ReleaseVxs(ref flattenVxs);
            VectorToolBox.ReleasePathWriter(ref pathWriter);



            return(vxs);
        }