~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kchart/kdchart/src/Ternary/TernaryConstants.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C++ -*-
2
 
   KDChart - a multi-platform charting engine
3
 
   */
4
 
 
5
 
/****************************************************************************
6
 
 ** Copyright (C) 2005-2007 Klarälvdalens Datakonsult AB.  All rights reserved.
7
 
 **
8
 
 ** This file is part of the KD Chart library.
9
 
 **
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).
17
 
 ** 
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.
22
 
 ** 
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.
25
 
 **
26
 
 **********************************************************************/
27
 
 
28
 
#include "TernaryConstants.h"
29
 
 
30
 
#include <cmath>
31
 
 
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() );
44
 
 
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 );
49