summaryrefslogtreecommitdiffstats
path: root/tests/manual/triangulator/main.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-01-17 11:37:02 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-01-24 16:23:20 +0000
commit962130c66c9c8d449769d15710595482632b82f5 (patch)
tree9927c4487a1e195a1f963c408566e2f197a79396 /tests/manual/triangulator/main.cpp
parent139d2e5f1024fe940285e897aae130f3d1c18b86 (diff)
Add manual test for the QtGui triangulator
Have a widget-based application that uses qTriangulate for fills and QTriangulatingStroker (and optionally the dash stroke processor) for strokes. The resulting triangle (strip) set is visualized on a simple QPainter canvas, offering the ability to zoom in and examine how the triangulator behaves on a number of example shapes. It is also possible to step through and only have the first N set of triangles drawn. Change-Id: I3a27d86d4ea13a63dd4be0fe81dd4b5ed6e4fa75 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests/manual/triangulator/main.cpp')
-rw-r--r--tests/manual/triangulator/main.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/manual/triangulator/main.cpp b/tests/manual/triangulator/main.cpp
new file mode 100644
index 0000000000..066c9f374e
--- /dev/null
+++ b/tests/manual/triangulator/main.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMainWindow>
+#include "triviswidget.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QMainWindow wnd;
+ wnd.resize(1280, 800);
+ wnd.setCentralWidget(new TriangulationVisualizer);
+ wnd.show();
+
+ return app.exec();
+}