~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dngconverter/dngwriter/extra/dng_sdk/dng_xy_coord.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer, Rohan Garg, Philip Muškovac, Felix Geyer
  • Date: 2011-09-23 18:18:55 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: package-import@ubuntu.com-20110923181855-ifs67wxkugshev9k
Tags: 2:2.1.1-0ubuntu1
[ Rohan Garg ]
* New upstream release (LP: #834190)
  - debian/control
    + Build with libqtwebkit-dev
 - debian/kipi-plugins-common
    + Install libkvkontakte required by kipi-plugins
 - debian/digikam
    + Install panoramagui

[ Philip Muškovac ]
* New upstream release
  - debian/control:
    + Add libcv-dev, libcvaux-dev, libhighgui-dev, libboost-graph1.46-dev,
      libksane-dev, libxml2-dev, libxslt-dev, libqt4-opengl-dev, libqjson-dev,
      libgpod-dev and libqca2-dev to build-deps
    + Add packages for kipi-plugins, libmediawiki, libkface, libkgeomap and
      libkvkontakte
  - debian/rules:
    + Don't build with gphoto2 since it doesn't build with it.
  - Add kubuntu_fix_test_linking.diff to fix linking of the dngconverter test
  - update install files
  - update kubuntu_01_mysqld_executable_name.diff for new cmake layout
    and rename to kubuntu_mysqld_executable_name.diff
* Fix typo in digikam-data description (LP: #804894)
* Fix Vcs links

[ Felix Geyer ]
* Move library data files to the new packages libkface-data, libkgeomap-data
  and libkvkontakte-data.
* Override version of the embedded library packages to 1.0~digikam<version>.
* Exclude the library packages from digikam-dbg to prevent file conflicts in
  the future.
* Call dh_install with --list-missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************/
 
2
// Copyright 2006 Adobe Systems Incorporated
 
3
// All Rights Reserved.
 
4
//
 
5
// NOTICE:  Adobe permits you to use, modify, and distribute this file in
 
6
// accordance with the terms of the Adobe license agreement accompanying it.
 
7
/*****************************************************************************/
 
8
 
 
9
/* $Id: //mondo/dng_sdk_1_3/dng_sdk/source/dng_xy_coord.h#1 $ */ 
 
10
/* $DateTime: 2009/06/22 05:04:49 $ */
 
11
/* $Change: 578634 $ */
 
12
/* $Author: tknoll $ */
 
13
 
 
14
/*****************************************************************************/
 
15
 
 
16
#ifndef __dng_xy_coord__
 
17
#define __dng_xy_coord__
 
18
 
 
19
/*****************************************************************************/
 
20
 
 
21
#include "dng_classes.h"
 
22
#include "dng_types.h"
 
23
 
 
24
/*****************************************************************************/
 
25
 
 
26
class dng_xy_coord
 
27
        {
 
28
        
 
29
        public:
 
30
        
 
31
                real64 x;
 
32
                real64 y;
 
33
                
 
34
        public:
 
35
        
 
36
                dng_xy_coord ()
 
37
                        :       x (0.0)
 
38
                        ,       y (0.0)
 
39
                        {
 
40
                        }
 
41
                        
 
42
                dng_xy_coord (real64 xx, real64 yy)
 
43
                        :       x (xx)
 
44
                        ,       y (yy)
 
45
                        {
 
46
                        }
 
47
                        
 
48
                void Clear ()
 
49
                        {
 
50
                        x = 0.0;
 
51
                        y = 0.0;
 
52
                        }
 
53
                        
 
54
                bool IsValid () const
 
55
                        {
 
56
                        return x > 0.0 &&
 
57
                                   y > 0.0;
 
58
                        }
 
59
 
 
60
                bool NotValid () const
 
61
                        {
 
62
                        return !IsValid ();
 
63
                        }
 
64
 
 
65
                bool operator== (const dng_xy_coord &coord) const
 
66
                        {
 
67
                        return coord.x == x &&
 
68
                                   coord.y == y;
 
69
                        }
 
70
 
 
71
                bool operator!= (const dng_xy_coord &coord) const
 
72
                        {
 
73
                        return !(*this == coord);
 
74
                        }
 
75
 
 
76
        };
 
77
 
 
78
/*****************************************************************************/
 
79
 
 
80
inline dng_xy_coord operator+ (const dng_xy_coord &A,
 
81
                                                           const dng_xy_coord &B)
 
82
        {
 
83
        
 
84
        dng_xy_coord C;
 
85
        
 
86
        C.x = A.x + B.x;
 
87
        C.y = A.y + B.y;
 
88
        
 
89
        return C;
 
90
        
 
91
        }
 
92
                        
 
93
/*****************************************************************************/
 
94
 
 
95
inline dng_xy_coord operator- (const dng_xy_coord &A,
 
96
                                                           const dng_xy_coord &B)
 
97
        {
 
98
        
 
99
        dng_xy_coord C;
 
100
        
 
101
        C.x = A.x - B.x;
 
102
        C.y = A.y - B.y;
 
103
        
 
104
        return C;
 
105
        
 
106
        }
 
107
                        
 
108
/*****************************************************************************/
 
109
 
 
110
inline dng_xy_coord operator* (real64 scale,
 
111
                                                           const dng_xy_coord &A)
 
112
        {
 
113
        
 
114
        dng_xy_coord B;
 
115
        
 
116
        B.x = A.x * scale;
 
117
        B.y = A.y * scale;
 
118
        
 
119
        return B;
 
120
        
 
121
        }
 
122
                        
 
123
/******************************************************************************/
 
124
 
 
125
inline real64 operator* (const dng_xy_coord &A,
 
126
                                                 const dng_xy_coord &B)
 
127
        {
 
128
        
 
129
        return A.x * B.x +
 
130
                   A.y * B.y;
 
131
        
 
132
        }
 
133
 
 
134
/*****************************************************************************/
 
135
 
 
136
// Standard xy coordinate constants.
 
137
 
 
138
inline dng_xy_coord StdA_xy_coord ()
 
139
        {
 
140
        return dng_xy_coord (0.4476, 0.4074);
 
141
        }
 
142
 
 
143
inline dng_xy_coord D50_xy_coord ()
 
144
        {
 
145
        return dng_xy_coord (0.3457, 0.3585);
 
146
        }
 
147
 
 
148
inline dng_xy_coord D55_xy_coord ()
 
149
        {
 
150
        return dng_xy_coord (0.3324, 0.3474);
 
151
        }
 
152
 
 
153
inline dng_xy_coord D65_xy_coord ()
 
154
        {
 
155
        return dng_xy_coord (0.3127, 0.3290);
 
156
        }
 
157
 
 
158
inline dng_xy_coord D75_xy_coord ()
 
159
        {
 
160
        return dng_xy_coord (0.2990, 0.3149);
 
161
        }
 
162
 
 
163
/*****************************************************************************/
 
164
 
 
165
// Convert between xy coordinates and XYZ coordinates.
 
166
 
 
167
dng_xy_coord XYZtoXY (const dng_vector_3 &coord);
 
168
 
 
169
dng_vector_3 XYtoXYZ (const dng_xy_coord &coord);
 
170
 
 
171
/*****************************************************************************/
 
172
 
 
173
// Returns the ICC XYZ profile connection space white point.
 
174
 
 
175
dng_xy_coord PCStoXY ();
 
176
 
 
177
dng_vector_3 PCStoXYZ ();
 
178
 
 
179
/*****************************************************************************/
 
180
 
 
181
#endif
 
182
        
 
183
/*****************************************************************************/