|
|
93cbac |
/*
|
|
|
93cbac |
......... 2015 Ivan Mahonin
|
|
|
93cbac |
|
|
|
93cbac |
This program is free software: you can redistribute it and/or modify
|
|
|
93cbac |
it under the terms of the GNU General Public License as published by
|
|
|
93cbac |
the Free Software Foundation, either version 3 of the License, or
|
|
|
93cbac |
(at your option) any later version.
|
|
|
93cbac |
|
|
|
93cbac |
This program is distributed in the hope that it will be useful,
|
|
|
93cbac |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
93cbac |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
93cbac |
GNU General Public License for more details.
|
|
|
93cbac |
|
|
|
93cbac |
You should have received a copy of the GNU General Public License
|
|
|
93cbac |
along with this program. If not, see <http: licenses="" www.gnu.org="">.</http:>
|
|
|
93cbac |
*/
|
|
|
93cbac |
|
|
|
93cbac |
#ifndef _TEST_H_
|
|
|
93cbac |
#define _TEST_H_
|
|
|
93cbac |
|
|
|
93cbac |
#include <ctime></ctime>
|
|
|
93cbac |
#include <string></string>
|
|
|
93cbac |
|
|
|
9edf2e |
#include "contour.h"
|
|
|
49e693 |
#include "environment.h"
|
|
|
a80036 |
|
|
|
93cbac |
class Test {
|
|
|
93cbac |
public:
|
|
|
9edf2e |
struct ContourInfo {
|
|
|
9edf2e |
bool invert;
|
|
|
9edf2e |
bool antialias;
|
|
|
9edf2e |
bool evenodd;
|
|
|
9edf2e |
Color color;
|
|
|
9edf2e |
Contour contour;
|
|
|
9edf2e |
ContourInfo(): invert(), antialias(), evenodd() { }
|
|
|
9edf2e |
};
|
|
|
9edf2e |
|
|
|
f29469 |
typedef std::vector<contourinfo> Data;</contourinfo>
|
|
|
7c6b57 |
|
|
|
d9c2d9 |
static void draw_contour(
|
|
|
d9c2d9 |
Environment &e,
|
|
|
d9c2d9 |
int start,
|
|
|
d9c2d9 |
int count,
|
|
|
d9c2d9 |
const rect<int> bounds,</int>
|
|
|
d9c2d9 |
bool even_odd,
|
|
|
d9c2d9 |
bool invert,
|
|
|
d9c2d9 |
const Color &color );
|
|
|
9edf2e |
|
|
|
f29469 |
static void load(Data &data, const std::string &filename);
|
|
|
f29469 |
static void transform(Data &data, const Rect &from, const Rect &to);
|
|
|
f29469 |
static void downgrade(Data &from, Data &to);
|
|
|
f29469 |
static void split(Data &from, Data &to);
|
|
|
9edf2e |
|
|
|
f29469 |
static void test_gl_stencil(Environment &e, Data &data);
|
|
|
f29469 |
static void test_sw(Environment &e, Data &data, Surface &surface);
|
|
|
f29469 |
static void test_cl(Environment &e, Data &data, Surface &surface);
|
|
|
b09c5d |
static void test_cl2(Environment &e, Data &data, Surface &surface);
|
|
|
105dfe |
static void test_cl3(Environment &e, Data &data, Surface &surface);
|
|
|
6fa009 |
static void test_cu(Environment &e, Data &data, Surface &surface);
|
|
|
93cbac |
};
|
|
|
93cbac |
|
|
|
93cbac |
#endif
|