public uint Vertex(out double x, out double y) { if (!Path.IsStop(m_curve3.Vertex(out x, out y))) { m_last_x = x; m_last_y = y; return((uint)Path.EPathCommands.LineTo); } if (!Path.IsStop(m_curve4.Vertex(out x, out y))) { m_last_x = x; m_last_y = y; return((uint)Path.EPathCommands.LineTo); } double ct2_x; double ct2_y; double end_x; double end_y; uint cmd = m_source.Vertex(out x, out y); switch (cmd) { case (uint)Path.EPathCommands.Curve3: m_source.Vertex(out end_x, out end_y); m_curve3.init(m_last_x, m_last_y, x, y, end_x, end_y); m_curve3.Vertex(out x, out y); // First call returns MoveTo m_curve3.Vertex(out x, out y); // This is the first Vertex of the curve cmd = (uint)Path.EPathCommands.LineTo; break; case (uint)Path.EPathCommands.Curve4: m_source.Vertex(out ct2_x, out ct2_y); m_source.Vertex(out end_x, out end_y); m_curve4.Init(m_last_x, m_last_y, x, y, ct2_x, ct2_y, end_x, end_y); m_curve4.Vertex(out x, out y); // First call returns MoveTo m_curve4.Vertex(out x, out y); // This is the first Vertex of the curve cmd = (uint)Path.EPathCommands.LineTo; break; } m_last_x = x; m_last_y = y; return(cmd); }