def test_draw_trackway_positions(self):
        """

        :return:
        """

        drawer = svg.SvgWriter()

        phases = limb.Property().assign(0.0, 0.5, 0.6, 0.1)

        trackway = generate.trackway_data(
            cycle_count=12,
            step_size=0.75,
            track_offsets=phases,
            activity_phases=phases,
            lateral_displacement=0.1
        )

        draw.trackway_positions(
            limb_positions=trackway.limb_positions,
            drawer=drawer
        )

        result = drawer.dumps()
        print(result)
def add_svg(
        sim_id: str,
        report: reporting.Report,
        track_definition: trackway.TrackwayDefinition,
        foot_positions: limb.Property
):
    """

    :param sim_id:
    :param report:
    :param track_definition:
    :param foot_positions:
    :return:
    """

    drawer = svg.SvgWriter(padding=5)
    svg_settings = draw.trackway_positions(
        limb_positions=track_definition.limb_positions,
        positions=foot_positions,
        drawer=drawer
    )

    dom_template = """
        <div class="svg-box">
          <div class="svg-box-inner">{{ svg }}</div>
          <div class="svg-controls-box" style="display:none">
            <div>
                <div>Activity: <span class="activity-status"></span></div>
                <div>Support: <span class="support-status"></span></div>
            </div>
            <div class="spacer"></div>
          </div>
        </div>
        """

    report.add_svg(
        drawer.dumps(),
        filename='{}.svg'.format(sim_id),
        dom_template=dom_template
    )

    return svg_settings