Ejemplo n.º 1
0
void 
RenderTask::Visit(const OrderedTask& task) 
{
  tpv.set_bounding_box(task.get_bounding_box(screen_bounds));
  tpv.set_active_index(task.getActiveIndex());
  draw_layers(task);
}
Ejemplo n.º 2
0
void
TaskRenderer::Draw(const OrderedTask &task)
{
    tpv.SetBoundingBox(task.get_bounding_box(screen_bounds));
    tpv.SetActiveIndex(task.GetActiveIndex());
    for (unsigned i = 0; i < 4; i++) {
        tpv.ResetIndex();

        if (i != RenderTaskPoint::LAYER_SYMBOLS && i != RenderTaskPoint::LAYER_LEG) {
            tpv.SetModeOptional(true);

            for (unsigned j = 0, end = task.optional_start_points_size(); j < end; ++j)
                tpv.Draw(*task.get_optional_start(j), (RenderTaskPoint::Layer)i);
        }

        tpv.SetModeOptional(false);
        for (unsigned j = 0, end = task.TaskSize(); j < end; ++j)
            tpv.Draw(task.GetTaskPoint(j), (RenderTaskPoint::Layer)i);
    }
}