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 #ifndef XCSOAR_TRAIL_RENDERER_HPP
25 #define XCSOAR_TRAIL_RENDERER_HPP
27 #include "Util/AllocatedArray.hpp"
28 #include "Engine/Trace/Point.hpp"
29 #include "Engine/Trace/Vector.hpp"
35 class WindowProjection
;
36 class ContestTraceVector
;
43 const TrailLook
&look
;
45 TracePointVector trace
;
46 AllocatedArray
<RasterPoint
> points
;
49 TrailRenderer(const TrailLook
&_look
):look(_look
) {}
52 * Load the full trace into this object.
54 bool LoadTrace(const TraceComputer
&trace_computer
);
57 * Load a filtered trace into this object.
59 bool LoadTrace(const TraceComputer
&trace_computer
, unsigned min_time
,
60 const WindowProjection
&projection
);
63 TaskProjection
GetBounds(const GeoPoint fallback_location
) const;
65 void Draw(Canvas
&canvas
, const TraceComputer
&trace_computer
,
66 const WindowProjection
&projection
, unsigned min_time
,
67 bool enable_traildrift
, const RasterPoint pos
, const NMEAInfo
&basic
,
68 const DerivedInfo
&calculated
, const TrailSettings
&settings
);
71 * Draw the trace that was obtained by LoadTrace() with the trace pen.
73 void Draw(Canvas
&canvas
, const WindowProjection
&projection
);
75 void Draw(Canvas
&canvas
, const TraceComputer
&trace_computer
,
76 const WindowProjection
&projection
, unsigned min_time
);
79 * Draw a ContestTraceVector. The caller must select a Pen.
81 void DrawTraceVector(Canvas
&canvas
, const WindowProjection
&projection
,
82 const ContestTraceVector
&trace
);
85 void DrawTraceVector(Canvas
&canvas
, const Projection
&projection
,
86 const TracePointVector
&trace
);