Clear() public method

public Clear ( ) : void
return void
Esempio n. 1
0
 public VertexStore MakeVxs(VertexStore output)
 {
     _reusablePathWriter.Clear();
     _reusablePathWriter.NewVxs();
     _reusablePathWriter.MoveTo(bounds.Left, bounds.Bottom);
     _reusablePathWriter.LineTo(bounds.Right, bounds.Bottom);
     _reusablePathWriter.LineTo(bounds.Right, bounds.Top);
     _reusablePathWriter.LineTo(bounds.Left, bounds.Top);
     _reusablePathWriter.CloseFigure();
     return(_reusablePathWriter.Vxs);
 }
Esempio n. 2
0
        public VertexStore MakeVxs()
        {
            PathWriter m_LinesToDraw = new PathWriter();

            m_LinesToDraw.Clear();
            m_LinesToDraw.MoveTo(bounds.Left, bounds.Bottom);
            m_LinesToDraw.LineTo(bounds.Right, bounds.Bottom);
            m_LinesToDraw.LineTo(bounds.Right, bounds.Top);
            m_LinesToDraw.LineTo(bounds.Left, bounds.Top);
            m_LinesToDraw.CloseFigure();
            return(m_LinesToDraw.Vxs);
        }
        public static void Load(PathWriter vertexSource, string pathAndFileName)
        {
            vertexSource.Clear();
            var vxs = vertexSource.Vxs;

            string[] allLines = File.ReadAllLines(pathAndFileName);
            foreach (string line in allLines)
            {
                string[]  elements        = line.Split(',');
                double    x               = double.Parse(elements[0]);
                double    y               = double.Parse(elements[1]);
                VertexCmd flagsAndCommand = (VertexCmd)System.Enum.Parse(typeof(VertexCmd), elements[2].Trim());
                int       len             = elements.Length;
                for (int i = 3; i < len; i++)
                {
                    flagsAndCommand |= (VertexCmd)System.Enum.Parse(typeof(VertexCmd), elements[i].Trim());
                }
                vxs.AddVertex(x, y, flagsAndCommand);
            }
        }
Esempio n. 4
0
 protected override void OnBeginRead(int countourCount)
 {
     ps.Clear();
 }