public override ShapePath.FlagsAndCommand vertex(out double x, out double y) { x = 0; y = 0; ShapePath.FlagsAndCommand cmd = ShapePath.FlagsAndCommand.CommandStop; switch (m_idx) { case 0: case 1: case 2: cmd = m_stroke.vertex(out x, out y); break; case 3: case 4: case 5: case 6: cmd = m_ellipse.vertex(out x, out y); break; } if (!ShapePath.is_stop(cmd)) { ParentToChildTransform.transform(ref x, ref y); } return(cmd); }
public override ShapePath.FlagsAndCommand vertex(out double x, out double y) { ShapePath.FlagsAndCommand cmd = ShapePath.FlagsAndCommand.Stop; double r = m_point_radius; if (m_status == 0) { cmd = m_stroke.vertex(out x, out y); if (!ShapePath.is_stop(cmd)) { ParentToChildTransform.transform(ref x, ref y); return(cmd); } if (m_node >= 0 && m_node == (int)(m_status)) { r *= 1.2; } m_ellipse.init(GetXN(m_status), GetYN(m_status), r, r, 32); ++m_status; } cmd = m_ellipse.vertex(out x, out y); if (!ShapePath.is_stop(cmd)) { ParentToChildTransform.transform(ref x, ref y); return(cmd); } if (m_status >= m_num_points) { return(ShapePath.FlagsAndCommand.Stop); } if (m_node >= 0 && m_node == (int)(m_status)) { r *= 1.2; } m_ellipse.init(GetXN(m_status), GetYN(m_status), r, r, 32); ++m_status; cmd = m_ellipse.vertex(out x, out y); if (!ShapePath.is_stop(cmd)) { ParentToChildTransform.transform(ref x, ref y); } return(cmd); }
public override ShapePath.FlagsAndCommand vertex(out double x, out double y) { x = 0; y = 0; ShapePath.FlagsAndCommand cmd = ShapePath.FlagsAndCommand.CommandLineTo; switch (m_idx) { case 0: cmd = m_curve_poly.vertex(out x, out y); break; case 1: if (m_vertex == 0 || m_vertex == 4 || m_vertex == 8 || m_vertex == 14) { cmd = ShapePath.FlagsAndCommand.CommandMoveTo; } if (m_vertex >= 20) { cmd = ShapePath.FlagsAndCommand.CommandStop; } x = gridVertexX[m_vertex]; y = gridVertexY[m_vertex]; m_vertex++; break; case 2: // Point1 case 3: // Point2 cmd = m_ellipse.vertex(out x, out y); break; case 4: cmd = m_text_poly.vertex(out x, out y); break; default: cmd = ShapePath.FlagsAndCommand.CommandStop; break; } return(cmd); }