scatter 0.1.0
ArrowPlot.hpp
1/*
2 * Copyright (C) Tobias Löw (tobi.loew@protonmail.ch)
3 *
4 * This file is part of Scatter
5 *
6 * Scatter is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Scatter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Scatter. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <scatter/Options.hpp>
23#include <scatter/plots/PlotBase.hpp>
24#include <variant>
25#include <vector>
26
27namespace scatter
28{
30 class Point;
31 class Arrow;
32
37 class ArrowPlot : public PlotBase
38 {
39 public:
41 class Options;
42
43 public:
52 ArrowPlot(const std::string &label, const std::vector<Arrow> &arrows, const Options &options);
53
61 ArrowPlot(const std::vector<Arrow> &arrows, const Options &options);
62
67 virtual ~ArrowPlot();
68
75
83 void render(Renderer &renderer, const Transform &transform);
84
91
92 private:
94 std::vector<Arrow> arrows_;
96 std::unique_ptr<Options> options_;
97
98 public:
100 typedef std::unique_ptr<ArrowPlot> Ptr;
101 };
102
103} // namespace scatter
[brief description]
Definition ArrowPlotOptions.hpp:34
[brief description]
Definition ArrowPlot.hpp:38
Legend::Entry getLegendEntry()
create LegendEntry
ArrowPlot(const std::vector< Arrow > &arrows, const Options &options)
constructor
void render(Renderer &renderer, const Transform &transform)
render the ArrowPlot
Options * options()
[brief description]
std::unique_ptr< ArrowPlot > Ptr
convenience typedef
Definition ArrowPlot.hpp:100
virtual ~ArrowPlot()
destuctor
ArrowPlot(const std::string &label, const std::vector< Arrow > &arrows, const Options &options)
[brief description]
[brief description]
Definition PlotBase.hpp:36
[brief description]
Definition Renderer.hpp:38
[brief description]
Definition Transform.hpp:36
[brief description]
Definition Legend.hpp:59