2
KDChart - a multi-platform charting engine
5
/****************************************************************************
6
** Copyright (C) 2005-2007 Klarälvdalens Datakonsult AB. All rights reserved.
8
** This file is part of the KD Chart library.
10
** This file may be used under the terms of the GNU General Public
11
** License versions 2.0 or 3.0 as published by the Free Software
12
** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
13
** included in the packaging of this file. Alternatively you may (at
14
** your option) use any later version of the GNU General Public
15
** License if such license has been publicly approved by
16
** Klarälvdalens Datakonsult AB (or its successors, if any).
18
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
19
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
20
** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
21
** not expressly granted herein.
23
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26
**********************************************************************/
28
#include "TernaryConstants.h"
32
extern const double Sqrt3 = sqrt( 3.0 );
33
extern const double TriangleWidth = 1.0;
34
extern const double TriangleHeight = 0.5 * Sqrt3;
35
extern const QPointF TriangleTop( 0.5, TriangleHeight );
36
extern const QPointF TriangleBottomLeft( 0.0, 0.0 );
37
extern const QPointF TriangleBottomRight( 1.0, 0.0 );
38
extern const QPointF AxisVector_C_A( TriangleTop - TriangleBottomRight );
39
extern const QPointF Norm_C_A( -AxisVector_C_A.y(), AxisVector_C_A.x() );
40
extern const QPointF AxisVector_B_A( TriangleTop );
41
extern const QPointF Norm_B_A( -AxisVector_B_A.y(), AxisVector_B_A.x() );
42
extern const QPointF AxisVector_B_C( TriangleBottomRight );
43
extern const QPointF Norm_B_C( -AxisVector_B_C.y(), AxisVector_B_C.x() );
45
extern const double RelMarkerLength = 0.03 * TriangleWidth;
46
extern const QPointF FullMarkerDistanceBC( RelMarkerLength * Norm_B_C );
47
extern const QPointF FullMarkerDistanceAC( -RelMarkerLength * Norm_C_A );
48
extern const QPointF FullMarkerDistanceBA( RelMarkerLength * Norm_B_A );