Android release v6.7_preview1
[xcsoar.git] / src / Topography / TopographyRenderer.cpp
blobb11bc7e1b05aca79ea34c34c3299c0d1a6f4fd4e
1 /*
2 Copyright_License {
4 XCSoar Glide Computer - http://www.xcsoar.org/
5 Copyright (C) 2000-2013 The XCSoar Project
6 A detailed list of copyright holders can be found in the file "AUTHORS".
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #include "Topography/TopographyRenderer.hpp"
25 #include "Topography/TopographyFileRenderer.hpp"
27 TopographyRenderer::TopographyRenderer(const TopographyStore &_store)
28 :store(_store)
30 for (unsigned i = 0; i < store.size(); ++i)
31 files.append(new TopographyFileRenderer(store[i]));
34 TopographyRenderer::~TopographyRenderer()
36 for (auto it = files.begin(), end = files.end(); it != end; ++it)
37 delete *it;
40 void
41 TopographyRenderer::Draw(Canvas &canvas,
42 const WindowProjection &projection) const
44 for (auto it = files.begin(), end = files.end(); it != end; ++it)
45 (*it)->Paint(canvas, projection);
48 void
49 TopographyRenderer::DrawLabels(Canvas &canvas,
50 const WindowProjection &projection,
51 LabelBlock &label_block) const
53 for (auto it = files.begin(), end = files.end(); it != end; ++it)
54 (*it)->PaintLabels(canvas, projection, label_block);