コード例 #1
0
ファイル: TaskRenderer.cpp プロジェクト: rjsikarwar/XCSoar
void 
TaskRenderer::Draw(const OrderedTask &task)
{
  tpv.SetBoundingBox(task.GetBoundingBox(screen_bounds));
  tpv.SetActiveIndex(task.GetActiveIndex());
  for (unsigned i = 0; i < 4; i++) {
    tpv.ResetIndex();

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

      for (const auto &tp : task.GetOptionalStartPoints())
        tpv.Draw(tp, (TaskPointRenderer::Layer)i);
    }

    tpv.SetModeOptional(false);
    for (const auto &tp : task.GetPoints())
      tpv.Draw(tp, (TaskPointRenderer::Layer)i);
  }

  if (task.GetFactoryType() == TaskFactoryType::MAT) {
    // now draw MAT circles
    tpv.ResetIndex();
    tpv.SetModeOptional(false);

    for (const auto *i : task.GetMatPoints())
      tpv.Draw(*i, (TaskPointRenderer::Layer)2);
  }
}
コード例 #2
0
ファイル: TaskRenderer.cpp プロジェクト: StefanL74/XCSoar
void 
TaskRenderer::Draw(const OrderedTask &task)
{
  tpv.SetBoundingBox(task.GetBoundingBox(screen_bounds));
  tpv.SetActiveIndex(task.GetActiveIndex());
  for (unsigned i = 0; i < 4; i++) {
    tpv.ResetIndex();

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

      for (const auto &tp : task.GetOptionalStartPoints())
        tpv.Draw(tp, (TaskPointRenderer::Layer)i);
    }

    tpv.SetModeOptional(false);
    for (const auto &tp : task.GetPoints())
      tpv.Draw(tp, (TaskPointRenderer::Layer)i);
  }
}
コード例 #3
0
ファイル: TaskRenderer.cpp プロジェクト: damianob/xcsoar
void 
TaskRenderer::Draw(const OrderedTask &task)
{
  tpv.SetBoundingBox(task.GetBoundingBox(screen_bounds));
  tpv.SetActiveIndex(task.GetActiveIndex());
  for (unsigned i = 0; i < 4; i++) {
    tpv.ResetIndex();

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

      for (unsigned j = 0, end = task.GetOptionalStartPointCount(); j < end; ++j)
        tpv.Draw(task.GetOptionalStartPoint(j), (TaskPointRenderer::Layer)i);
    }

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