scatter 0.1.0
Renderer.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 <string>
23#include <utility>
24//
25#include <scatter/Colour.hpp>
26#include <scatter/TextOptions.hpp>
27
28namespace scatter
29{
30 class Point;
31
38 {
39 public:
45
50 virtual ~Renderer();
51
59 virtual void restrictArea(const Point &p1, const Point &p2) = 0;
60
68 virtual void area(const std::vector<Point> &points, const Colour &colour = Colour()) = 0;
69
79 virtual void circle(const Point &p, const double &radius, const Colour &colour = Colour(), bool fill = true) = 0;
80
90 virtual void line(const Point &p1, const Point &p2, const Colour &colour = Colour(), const double &line_width = 0.1) = 0;
91
101 virtual void rectangle(const Point &p1, const Point &p2, const Colour &colour = Colour(), bool fill = true) = 0;
102
114 virtual void ellipse(const Point &p, const double &minor, const double &major, const double &rotation, const Colour &colour = Colour(),
115 bool fill = true) = 0;
116
125 virtual void asterisk(const Point &p, const double &radius, const Colour &colour = Colour()) = 0;
126
135 virtual void cross(const Point &p, const double &radius, const Colour &colour = Colour()) = 0;
136
145 virtual void plus(const Point &p, const double &radius, const Colour &colour = Colour()) = 0;
146
156 virtual void triangle(const Point &p, const double &radius, const Colour &colour = Colour(), bool fill = true) = 0;
157
167 virtual void diamond(const Point &p, const double &radius, const Colour &colour = Colour(), bool fill = true) = 0;
168
178 virtual void square(const Point &p, const double &radius, const Colour &colour = Colour(), bool fill = true) = 0;
179
189 virtual void star(const Point &p, const double &radius, const Colour &colour = Colour(), bool fill = true) = 0;
190
201 virtual void arrow(const Point &p1, const Point &p2, const Point &p3, const Point &p4, const Colour &colour = Colour()) = 0;
202
211 virtual void text(const Point &p, const std::string &label, const TextOptions &options = TextOptions()) = 0;
212
221 virtual void text(const Point &p, const std::string &label, const Anchor &anchor) = 0;
222
230 virtual double getCharWidth(const TextOptions &options) = 0;
231
232 protected:
233 private:
234 };
235
236} // namespace scatter
define a RGBA colour
Definition Colour.hpp:34
[brief description]
Definition Point.hpp:29
[brief description]
Definition Renderer.hpp:38
virtual void cross(const Point &p, const double &radius, const Colour &colour=Colour())=0
[brief description]
virtual void plus(const Point &p, const double &radius, const Colour &colour=Colour())=0
[brief description]
virtual void line(const Point &p1, const Point &p2, const Colour &colour=Colour(), const double &line_width=0.1)=0
[brief description]
virtual void area(const std::vector< Point > &points, const Colour &colour=Colour())=0
[brief description]
virtual void ellipse(const Point &p, const double &minor, const double &major, const double &rotation, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual void diamond(const Point &p, const double &radius, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual void text(const Point &p, const std::string &label, const TextOptions &options=TextOptions())=0
[brief description]
virtual void circle(const Point &p, const double &radius, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual void star(const Point &p, const double &radius, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual void restrictArea(const Point &p1, const Point &p2)=0
[brief description]
virtual void rectangle(const Point &p1, const Point &p2, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual ~Renderer()
[brief description]
virtual void triangle(const Point &p, const double &radius, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual void square(const Point &p, const double &radius, const Colour &colour=Colour(), bool fill=true)=0
[brief description]
virtual void text(const Point &p, const std::string &label, const Anchor &anchor)=0
[brief description]
virtual void asterisk(const Point &p, const double &radius, const Colour &colour=Colour())=0
[brief description]
virtual void arrow(const Point &p1, const Point &p2, const Point &p3, const Point &p4, const Colour &colour=Colour())=0
[brief description]
Renderer()
[brief description]
virtual double getCharWidth(const TextOptions &options)=0
[brief description]
[brief description]
Definition TextOptions.hpp:32