~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to qwt-5.1.2/doc/html/qwt__double__rect_8cpp-source.html

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2009-04-12 23:25:58 UTC
  • mfrom: (1.1.4 upstream) (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090412232558-3bl06x785yr8xm8u
Tags: 5.1.2-1
* New upstream release.
* Bump compat/debhelper to 7.
* Bump Standards-Version to 3.8.1. No changes needed.
* Invert Maintainers and Uploaders field.
* Fix lintian warnings:
  - dh_clean _k deprecated.
  - missing dependency on libc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
 
3
<title>Qwt User&apos;s Guide: qwt_double_rect.cpp Source File</title>
 
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
 
5
<link href="tabs.css" rel="stylesheet" type="text/css">
 
6
</head><body>
 
7
<!-- Generated by Doxygen 1.5.0 -->
 
8
<div class="tabs">
 
9
  <ul>
 
10
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
 
11
    <li><a href="classes.html"><span>Classes</span></a></li>
 
12
    <li id="current"><a href="files.html"><span>Files</span></a></li>
 
13
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
 
14
  </ul></div>
 
15
<div class="tabs">
 
16
  <ul>
 
17
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
 
18
    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
 
19
  </ul></div>
 
20
<h1>qwt_double_rect.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************</span>
 
21
<a name="l00002"></a>00002 <span class="comment"> * Qwt Widget Library</span>
 
22
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1997   Josef Wilgen</span>
 
23
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002   Uwe Rathmann</span>
 
24
<a name="l00005"></a>00005 <span class="comment"> *</span>
 
25
<a name="l00006"></a>00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
 
26
<a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span>
 
27
<a name="l00008"></a>00008 <span class="comment"> *****************************************************************************/</span>
 
28
<a name="l00009"></a>00009 
 
29
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;qglobal.h&gt;</span>
 
30
<a name="l00011"></a>00011 
 
31
<a name="l00012"></a>00012 <span class="preprocessor">#if QT_VERSION &lt; 0x040000</span>
 
32
<a name="l00013"></a>00013 <span class="preprocessor"></span>
 
33
<a name="l00014"></a>00014 <span class="preprocessor">#include "qwt_math.h"</span>
 
34
<a name="l00015"></a>00015 <span class="preprocessor">#include "<a class="code" href="qwt__double__rect_8h.html">qwt_double_rect.h</a>"</span>
 
35
<a name="l00016"></a>00016 
 
36
<a name="l00022"></a>00022 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint::QwtDoublePoint</a>():
 
37
<a name="l00023"></a>00023     d_x(0.0),
 
38
<a name="l00024"></a>00024     d_y(0.0)
 
39
<a name="l00025"></a>00025 {
 
40
<a name="l00026"></a>00026 }
 
41
<a name="l00027"></a>00027 
 
42
<a name="l00029"></a>00029 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint::QwtDoublePoint</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y ):
 
43
<a name="l00030"></a>00030     d_x(x),
 
44
<a name="l00031"></a>00031     d_y(y)
 
45
<a name="l00032"></a>00032 {
 
46
<a name="l00033"></a>00033 }
 
47
<a name="l00034"></a>00034 
 
48
<a name="l00040"></a>00040 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint::QwtDoublePoint</a>(<span class="keyword">const</span> QPoint &amp;p):
 
49
<a name="l00041"></a>00041     d_x(double(p.x())),
 
50
<a name="l00042"></a>00042     d_y(double(p.y()))
 
51
<a name="l00043"></a>00043 {
 
52
<a name="l00044"></a>00044 }
 
53
<a name="l00045"></a>00045 
 
54
<a name="l00052"></a>00052 <span class="keywordtype">bool</span> QwtDoublePoint::operator==(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;other)<span class="keyword"> const</span>
 
55
<a name="l00053"></a>00053 <span class="keyword"></span>{
 
56
<a name="l00054"></a>00054     <span class="keywordflow">return</span> (d_x == other.d_x) &amp;&amp; (d_y == other.d_y);
 
57
<a name="l00055"></a>00055 }
 
58
<a name="l00056"></a>00056 
 
59
<a name="l00058"></a>00058 <span class="keywordtype">bool</span> QwtDoublePoint::operator!=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;other)<span class="keyword"> const</span>
 
60
<a name="l00059"></a>00059 <span class="keyword"></span>{
 
61
<a name="l00060"></a>00060     <span class="keywordflow">return</span> !operator==(other);
 
62
<a name="l00061"></a>00061 }
 
63
<a name="l00062"></a>00062 
 
64
<a name="l00067"></a>00067 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> QwtDoublePoint::operator-()<span class="keyword"> const</span>
 
65
<a name="l00068"></a>00068 <span class="keyword"></span>{
 
66
<a name="l00069"></a>00069     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a>(-d_x, -d_y);
 
67
<a name="l00070"></a>00070 }
 
68
<a name="l00071"></a>00071 
 
69
<a name="l00077"></a>00077 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> QwtDoublePoint::operator+(
 
70
<a name="l00078"></a>00078     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;other)<span class="keyword"> const</span>
 
71
<a name="l00079"></a>00079 <span class="keyword"></span>{
 
72
<a name="l00080"></a>00080     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a>(d_x + other.d_x, d_y + other.d_y);
 
73
<a name="l00081"></a>00081 }
 
74
<a name="l00082"></a>00082 
 
75
<a name="l00088"></a>00088 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> QwtDoublePoint::operator-(
 
76
<a name="l00089"></a>00089     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;other)<span class="keyword"> const</span>
 
77
<a name="l00090"></a>00090 <span class="keyword"></span>{
 
78
<a name="l00091"></a>00091     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a>(d_x - other.d_x, d_y - other.d_y);
 
79
<a name="l00092"></a>00092 }
 
80
<a name="l00093"></a>00093 
 
81
<a name="l00099"></a>00099 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> QwtDoublePoint::operator*(<span class="keywordtype">double</span> factor)<span class="keyword"> const</span>
 
82
<a name="l00100"></a>00100 <span class="keyword"></span>{
 
83
<a name="l00101"></a>00101     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a>(d_x * factor, d_y * factor);
 
84
<a name="l00102"></a>00102 }
 
85
<a name="l00103"></a>00103 
 
86
<a name="l00109"></a>00109 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> QwtDoublePoint::operator/(<span class="keywordtype">double</span> factor)<span class="keyword"> const</span>
 
87
<a name="l00110"></a>00110 <span class="keyword"></span>{
 
88
<a name="l00111"></a>00111     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a>(d_x / factor, d_y / factor);
 
89
<a name="l00112"></a>00112 }
 
90
<a name="l00113"></a>00113 
 
91
<a name="l00119"></a>00119 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;QwtDoublePoint::operator+=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;other)
 
92
<a name="l00120"></a>00120 {
 
93
<a name="l00121"></a>00121     d_x += other.d_x;
 
94
<a name="l00122"></a>00122     d_y += other.d_y;
 
95
<a name="l00123"></a>00123     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
96
<a name="l00124"></a>00124 }
 
97
<a name="l00125"></a>00125 
 
98
<a name="l00131"></a>00131 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;QwtDoublePoint::operator-=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;other)
 
99
<a name="l00132"></a>00132 {
 
100
<a name="l00133"></a>00133     d_x -= other.d_x;
 
101
<a name="l00134"></a>00134     d_y -= other.d_y;
 
102
<a name="l00135"></a>00135     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
103
<a name="l00136"></a>00136 }
 
104
<a name="l00137"></a>00137 
 
105
<a name="l00143"></a>00143 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;QwtDoublePoint::operator*=(<span class="keywordtype">double</span> factor)
 
106
<a name="l00144"></a>00144 {
 
107
<a name="l00145"></a>00145     d_x *= factor;
 
108
<a name="l00146"></a>00146     d_y *= factor;
 
109
<a name="l00147"></a>00147     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
110
<a name="l00148"></a>00148 }
 
111
<a name="l00149"></a>00149 
 
112
<a name="l00155"></a>00155 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;QwtDoublePoint::operator/=(<span class="keywordtype">double</span> factor)
 
113
<a name="l00156"></a>00156 {
 
114
<a name="l00157"></a>00157     d_x /= factor;
 
115
<a name="l00158"></a>00158     d_y /= factor;
 
116
<a name="l00159"></a>00159     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
117
<a name="l00160"></a>00160 }
 
118
<a name="l00161"></a>00161 
 
119
<a name="l00163"></a>00163 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize::QwtDoubleSize</a>():
 
120
<a name="l00164"></a>00164     d_width(-1.0),
 
121
<a name="l00165"></a>00165     d_height(-1.0)
 
122
<a name="l00166"></a>00166 {   
 
123
<a name="l00167"></a>00167 }   
 
124
<a name="l00168"></a>00168 
 
125
<a name="l00170"></a>00170 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize::QwtDoubleSize</a>( <span class="keywordtype">double</span> width, <span class="keywordtype">double</span> height ):
 
126
<a name="l00171"></a>00171     d_width(width),
 
127
<a name="l00172"></a>00172     d_height(height)
 
128
<a name="l00173"></a>00173 {   
 
129
<a name="l00174"></a>00174 }   
 
130
<a name="l00175"></a>00175 
 
131
<a name="l00177"></a>00177 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize::QwtDoubleSize</a>(<span class="keyword">const</span> QSize &amp;sz):
 
132
<a name="l00178"></a>00178     d_width(double(sz.width())),
 
133
<a name="l00179"></a>00179     d_height(double(sz.height()))
 
134
<a name="l00180"></a>00180 {   
 
135
<a name="l00181"></a>00181 }   
 
136
<a name="l00182"></a>00182 
 
137
<a name="l00184"></a>00184 <span class="keywordtype">void</span> QwtDoubleSize::transpose()
 
138
<a name="l00185"></a>00185 {   
 
139
<a name="l00186"></a>00186     <span class="keywordtype">double</span> tmp = d_width;
 
140
<a name="l00187"></a>00187     d_width = d_height;
 
141
<a name="l00188"></a>00188     d_height = tmp;
 
142
<a name="l00189"></a>00189 }
 
143
<a name="l00190"></a>00190 
 
144
<a name="l00195"></a>00195 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> QwtDoubleSize::expandedTo(
 
145
<a name="l00196"></a>00196     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)<span class="keyword"> const</span>
 
146
<a name="l00197"></a>00197 <span class="keyword"></span>{   
 
147
<a name="l00198"></a>00198     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a>(
 
148
<a name="l00199"></a>00199         qwtMax(d_width, other.d_width),
 
149
<a name="l00200"></a>00200         qwtMax(d_height, other.d_height)
 
150
<a name="l00201"></a>00201     );  
 
151
<a name="l00202"></a>00202 }   
 
152
<a name="l00203"></a>00203 
 
153
<a name="l00207"></a>00207 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> QwtDoubleSize::boundedTo(
 
154
<a name="l00208"></a>00208     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)<span class="keyword"> const</span>
 
155
<a name="l00209"></a>00209 <span class="keyword"></span>{   
 
156
<a name="l00210"></a>00210     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a>(
 
157
<a name="l00211"></a>00211         qwtMin(d_width, other.d_width),
 
158
<a name="l00212"></a>00212         qwtMin(d_height, other.d_height)
 
159
<a name="l00213"></a>00213     );  
 
160
<a name="l00214"></a>00214 }   
 
161
<a name="l00215"></a>00215 
 
162
<a name="l00217"></a>00217 <span class="keywordtype">bool</span> QwtDoubleSize::operator==(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)<span class="keyword"> const</span>
 
163
<a name="l00218"></a>00218 <span class="keyword"></span>{ 
 
164
<a name="l00219"></a>00219     <span class="keywordflow">return</span> d_width == other.d_width &amp;&amp; d_height == other.d_height;
 
165
<a name="l00220"></a>00220 }   
 
166
<a name="l00221"></a>00221 
 
167
<a name="l00223"></a>00223 <span class="keywordtype">bool</span> QwtDoubleSize::operator!=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)<span class="keyword"> const</span>
 
168
<a name="l00224"></a>00224 <span class="keyword"></span>{ 
 
169
<a name="l00225"></a>00225     <span class="keywordflow">return</span> !operator==(other);
 
170
<a name="l00226"></a>00226 }   
 
171
<a name="l00227"></a>00227 
 
172
<a name="l00232"></a>00232 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> QwtDoubleSize::operator+(
 
173
<a name="l00233"></a>00233     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)<span class="keyword"> const</span>
 
174
<a name="l00234"></a>00234 <span class="keyword"></span>{   
 
175
<a name="l00235"></a>00235     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a>(d_width + other.d_width,
 
176
<a name="l00236"></a>00236         d_height + other.d_height); 
 
177
<a name="l00237"></a>00237 }       
 
178
<a name="l00238"></a>00238 
 
179
<a name="l00243"></a>00243 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> QwtDoubleSize::operator-(
 
180
<a name="l00244"></a>00244     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)<span class="keyword"> const</span>
 
181
<a name="l00245"></a>00245 <span class="keyword"></span>{   
 
182
<a name="l00246"></a>00246     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a>(d_width - other.d_width,
 
183
<a name="l00247"></a>00247         d_height - other.d_height); 
 
184
<a name="l00248"></a>00248 }       
 
185
<a name="l00249"></a>00249 
 
186
<a name="l00251"></a>00251 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> QwtDoubleSize::operator*(<span class="keywordtype">double</span> c)<span class="keyword"> const</span>
 
187
<a name="l00252"></a>00252 <span class="keyword"></span>{ 
 
188
<a name="l00253"></a>00253     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a>(d_width * c, d_height * c);
 
189
<a name="l00254"></a>00254 }   
 
190
<a name="l00255"></a>00255 
 
191
<a name="l00257"></a>00257 <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> QwtDoubleSize::operator/(<span class="keywordtype">double</span> c)<span class="keyword"> const</span>
 
192
<a name="l00258"></a>00258 <span class="keyword"></span>{ 
 
193
<a name="l00259"></a>00259     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a>(d_width / c, d_height / c);
 
194
<a name="l00260"></a>00260 }   
 
195
<a name="l00261"></a>00261 
 
196
<a name="l00263"></a>00263 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;QwtDoubleSize::operator+=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)
 
197
<a name="l00264"></a>00264 {   
 
198
<a name="l00265"></a>00265     d_width += other.d_width; 
 
199
<a name="l00266"></a>00266     d_height += other.d_height;
 
200
<a name="l00267"></a>00267     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
201
<a name="l00268"></a>00268 }
 
202
<a name="l00269"></a>00269 
 
203
<a name="l00271"></a>00271 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;QwtDoubleSize::operator-=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;other)
 
204
<a name="l00272"></a>00272 {   
 
205
<a name="l00273"></a>00273     d_width -= other.d_width; 
 
206
<a name="l00274"></a>00274     d_height -= other.d_height;
 
207
<a name="l00275"></a>00275     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
208
<a name="l00276"></a>00276 }
 
209
<a name="l00277"></a>00277 
 
210
<a name="l00278"></a>00278 <span class="comment">/* </span>
 
211
<a name="l00279"></a>00279 <span class="comment">  Multiplies this size's width and height by c, </span>
 
212
<a name="l00280"></a>00280 <span class="comment">  and returns a reference to this size.</span>
 
213
<a name="l00281"></a>00281 <span class="comment">*/</span>
 
214
<a name="l00282"></a>00282 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;QwtDoubleSize::operator*=(<span class="keywordtype">double</span> c)
 
215
<a name="l00283"></a>00283 {   
 
216
<a name="l00284"></a>00284     d_width *= c; 
 
217
<a name="l00285"></a>00285     d_height *= c;
 
218
<a name="l00286"></a>00286     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
219
<a name="l00287"></a>00287 }
 
220
<a name="l00288"></a>00288 
 
221
<a name="l00289"></a>00289 <span class="comment">/* </span>
 
222
<a name="l00290"></a>00290 <span class="comment">  Devides this size's width and height by c, </span>
 
223
<a name="l00291"></a>00291 <span class="comment">  and returns a reference to this size.</span>
 
224
<a name="l00292"></a>00292 <span class="comment">*/</span>
 
225
<a name="l00293"></a>00293 <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;QwtDoubleSize::operator/=(<span class="keywordtype">double</span> c)
 
226
<a name="l00294"></a>00294 {
 
227
<a name="l00295"></a>00295     d_width /= c;
 
228
<a name="l00296"></a>00296     d_height /= c;
 
229
<a name="l00297"></a>00297     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
230
<a name="l00298"></a>00298 }   
 
231
<a name="l00299"></a>00299 
 
232
<a name="l00301"></a>00301 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect::QwtDoubleRect</a>():
 
233
<a name="l00302"></a>00302     d_left(0.0),
 
234
<a name="l00303"></a>00303     d_right(0.0),
 
235
<a name="l00304"></a>00304     d_top(0.0),
 
236
<a name="l00305"></a>00305     d_bottom(0.0)
 
237
<a name="l00306"></a>00306 {
 
238
<a name="l00307"></a>00307 }
 
239
<a name="l00308"></a>00308 
 
240
<a name="l00313"></a>00313 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect::QwtDoubleRect</a>(<span class="keywordtype">double</span> left, <span class="keywordtype">double</span> top,
 
241
<a name="l00314"></a>00314         <span class="keywordtype">double</span> width, <span class="keywordtype">double</span> height):
 
242
<a name="l00315"></a>00315     d_left(left),
 
243
<a name="l00316"></a>00316     d_right(left + width),
 
244
<a name="l00317"></a>00317     d_top(top),
 
245
<a name="l00318"></a>00318     d_bottom(top + height)
 
246
<a name="l00319"></a>00319 {
 
247
<a name="l00320"></a>00320 }
 
248
<a name="l00321"></a>00321 
 
249
<a name="l00326"></a>00326 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect::QwtDoubleRect</a>(
 
250
<a name="l00327"></a>00327         <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;p, <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;size):
 
251
<a name="l00328"></a>00328     d_left(p.x()),
 
252
<a name="l00329"></a>00329     d_right(p.x() + size.width()),
 
253
<a name="l00330"></a>00330     d_top(p.y()),
 
254
<a name="l00331"></a>00331     d_bottom(p.y() + size.height())
 
255
<a name="l00332"></a>00332 {
 
256
<a name="l00333"></a>00333 }
 
257
<a name="l00334"></a>00334 
 
258
<a name="l00335"></a>00335 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect::QwtDoubleRect</a>(<span class="keyword">const</span> QRect &amp;rect):
 
259
<a name="l00336"></a>00336     d_left(rect.left()),
 
260
<a name="l00337"></a>00337     d_right(rect.right()),
 
261
<a name="l00338"></a>00338     d_top(rect.top()),
 
262
<a name="l00339"></a>00339     d_bottom(rect.bottom())
 
263
<a name="l00340"></a>00340 {
 
264
<a name="l00341"></a>00341 }
 
265
<a name="l00342"></a>00342 
 
266
<a name="l00343"></a>00343 QRect QwtDoubleRect::toRect()<span class="keyword"> const</span>
 
267
<a name="l00344"></a>00344 <span class="keyword"></span>{
 
268
<a name="l00345"></a>00345     <span class="keywordflow">return</span> QRect(qRound(x()), qRound(y()), qRound(width()), qRound(height()));
 
269
<a name="l00346"></a>00346 }
 
270
<a name="l00347"></a>00347 
 
271
<a name="l00351"></a>00351 <span class="keywordtype">void</span> QwtDoubleRect::setRect(<span class="keywordtype">double</span> left, <span class="keywordtype">double</span> top, 
 
272
<a name="l00352"></a>00352     <span class="keywordtype">double</span> width, <span class="keywordtype">double</span> height)
 
273
<a name="l00353"></a>00353 {
 
274
<a name="l00354"></a>00354     d_left = left;
 
275
<a name="l00355"></a>00355     d_right = left + width;
 
276
<a name="l00356"></a>00356     d_top = top;
 
277
<a name="l00357"></a>00357     d_bottom = top + height;
 
278
<a name="l00358"></a>00358 }
 
279
<a name="l00359"></a>00359 
 
280
<a name="l00364"></a>00364 <span class="keywordtype">void</span> QwtDoubleRect::setSize(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#b86c0b8b4728646331f12743013c5b43">QwtDoubleSize</a> &amp;size)
 
281
<a name="l00365"></a>00365 {
 
282
<a name="l00366"></a>00366     setWidth(size.width());
 
283
<a name="l00367"></a>00367     setHeight(size.height());
 
284
<a name="l00368"></a>00368 }
 
285
<a name="l00369"></a>00369 
 
286
<a name="l00376"></a>00376 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> QwtDoubleRect::normalized()<span class="keyword"> const</span>
 
287
<a name="l00377"></a>00377 <span class="keyword"></span>{
 
288
<a name="l00378"></a>00378     <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> r;
 
289
<a name="l00379"></a>00379     <span class="keywordflow">if</span> ( d_right &lt; d_left ) 
 
290
<a name="l00380"></a>00380     {
 
291
<a name="l00381"></a>00381         r.d_left = d_right;
 
292
<a name="l00382"></a>00382         r.d_right = d_left;
 
293
<a name="l00383"></a>00383     } 
 
294
<a name="l00384"></a>00384     <span class="keywordflow">else</span> 
 
295
<a name="l00385"></a>00385     {
 
296
<a name="l00386"></a>00386         r.d_left = d_left;
 
297
<a name="l00387"></a>00387         r.d_right = d_right; 
 
298
<a name="l00388"></a>00388     }
 
299
<a name="l00389"></a>00389     <span class="keywordflow">if</span> ( d_bottom &lt; d_top ) 
 
300
<a name="l00390"></a>00390     { 
 
301
<a name="l00391"></a>00391         r.d_top = d_bottom; 
 
302
<a name="l00392"></a>00392         r.d_bottom = d_top;
 
303
<a name="l00393"></a>00393     } 
 
304
<a name="l00394"></a>00394     <span class="keywordflow">else</span> 
 
305
<a name="l00395"></a>00395     {
 
306
<a name="l00396"></a>00396         r.d_top = d_top;
 
307
<a name="l00397"></a>00397         r.d_bottom = d_bottom;
 
308
<a name="l00398"></a>00398     }
 
309
<a name="l00399"></a>00399     <span class="keywordflow">return</span> r;
 
310
<a name="l00400"></a>00400 }
 
311
<a name="l00401"></a>00401 
 
312
<a name="l00406"></a>00406 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> QwtDoubleRect::unite(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
313
<a name="l00407"></a>00407 <span class="keyword"></span>{
 
314
<a name="l00408"></a>00408     <span class="keywordflow">return</span> *<span class="keyword">this</span> | other;
 
315
<a name="l00409"></a>00409 }
 
316
<a name="l00410"></a>00410 
 
317
<a name="l00415"></a>00415 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> QwtDoubleRect::intersect(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
318
<a name="l00416"></a>00416 <span class="keyword"></span>{
 
319
<a name="l00417"></a>00417     <span class="keywordflow">return</span> *<span class="keyword">this</span> &amp; other;
 
320
<a name="l00418"></a>00418 }
 
321
<a name="l00419"></a>00419 
 
322
<a name="l00424"></a>00424 <span class="keywordtype">bool</span> QwtDoubleRect::intersects(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
323
<a name="l00425"></a>00425 <span class="keyword"></span>{
 
324
<a name="l00426"></a>00426     <span class="keywordflow">return</span> ( qwtMax(d_left, other.d_left) &lt;= qwtMin(d_right, other.d_right) ) &amp;&amp;
 
325
<a name="l00427"></a>00427          ( qwtMax(d_top, other.d_top ) &lt;= qwtMin(d_bottom, other.d_bottom) );
 
326
<a name="l00428"></a>00428 }
 
327
<a name="l00429"></a>00429 
 
328
<a name="l00431"></a>00431 <span class="keywordtype">bool</span> QwtDoubleRect::operator==(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
329
<a name="l00432"></a>00432 <span class="keyword"></span>{
 
330
<a name="l00433"></a>00433     <span class="keywordflow">return</span> d_left == other.d_left &amp;&amp; d_right == other.d_right &amp;&amp; 
 
331
<a name="l00434"></a>00434         d_top == other.d_top &amp;&amp; d_bottom == other.d_bottom;
 
332
<a name="l00435"></a>00435 }
 
333
<a name="l00436"></a>00436 
 
334
<a name="l00438"></a>00438 <span class="keywordtype">bool</span> QwtDoubleRect::operator!=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
335
<a name="l00439"></a>00439 <span class="keyword"></span>{
 
336
<a name="l00440"></a>00440     <span class="keywordflow">return</span> !operator==(other);
 
337
<a name="l00441"></a>00441 }
 
338
<a name="l00442"></a>00442 
 
339
<a name="l00448"></a>00448 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> QwtDoubleRect::operator|(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
340
<a name="l00449"></a>00449 <span class="keyword"></span>{
 
341
<a name="l00450"></a>00450     <span class="keywordflow">if</span> ( isEmpty() ) 
 
342
<a name="l00451"></a>00451         <span class="keywordflow">return</span> other;
 
343
<a name="l00452"></a>00452 
 
344
<a name="l00453"></a>00453     <span class="keywordflow">if</span> ( other.isEmpty() ) 
 
345
<a name="l00454"></a>00454         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
346
<a name="l00455"></a>00455         
 
347
<a name="l00456"></a>00456     <span class="keyword">const</span> <span class="keywordtype">double</span> minX = qwtMin(d_left, other.d_left);
 
348
<a name="l00457"></a>00457     <span class="keyword">const</span> <span class="keywordtype">double</span> maxX = qwtMax(d_right, other.d_right);
 
349
<a name="l00458"></a>00458     <span class="keyword">const</span> <span class="keywordtype">double</span> minY = qwtMin(d_top, other.d_top);
 
350
<a name="l00459"></a>00459     <span class="keyword">const</span> <span class="keywordtype">double</span> maxY = qwtMax(d_bottom, other.d_bottom);
 
351
<a name="l00460"></a>00460 
 
352
<a name="l00461"></a>00461     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a>(minX, minY, maxX - minX, maxY - minY);
 
353
<a name="l00462"></a>00462 }
 
354
<a name="l00463"></a>00463 
 
355
<a name="l00468"></a>00468 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> QwtDoubleRect::operator&amp;(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)<span class="keyword"> const</span>
 
356
<a name="l00469"></a>00469 <span class="keyword"></span>{
 
357
<a name="l00470"></a>00470     <span class="keywordflow">if</span> (isNull() || other.isNull())
 
358
<a name="l00471"></a>00471         <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a>();
 
359
<a name="l00472"></a>00472 
 
360
<a name="l00473"></a>00473     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> r1 = normalized();
 
361
<a name="l00474"></a>00474     <span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> r2 = other.normalized();
 
362
<a name="l00475"></a>00475 
 
363
<a name="l00476"></a>00476     <span class="keyword">const</span> <span class="keywordtype">double</span> minX = qwtMax(r1.left(), r2.left());
 
364
<a name="l00477"></a>00477     <span class="keyword">const</span> <span class="keywordtype">double</span> maxX = qwtMin(r1.right(), r2.right());
 
365
<a name="l00478"></a>00478     <span class="keyword">const</span> <span class="keywordtype">double</span> minY = qwtMax(r1.top(), r2.top());
 
366
<a name="l00479"></a>00479     <span class="keyword">const</span> <span class="keywordtype">double</span> maxY = qwtMin(r1.bottom(), r2.bottom());
 
367
<a name="l00480"></a>00480 
 
368
<a name="l00481"></a>00481     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a>(minX, minY, maxX - minX, maxY - minY);
 
369
<a name="l00482"></a>00482 }
 
370
<a name="l00483"></a>00483 
 
371
<a name="l00485"></a>00485 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;QwtDoubleRect::operator|=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)
 
372
<a name="l00486"></a>00486 {
 
373
<a name="l00487"></a>00487     *<span class="keyword">this</span> = *<span class="keyword">this</span> | other;
 
374
<a name="l00488"></a>00488     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
375
<a name="l00489"></a>00489 }
 
376
<a name="l00490"></a>00490 
 
377
<a name="l00492"></a>00492 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;QwtDoubleRect::operator&amp;=(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other)
 
378
<a name="l00493"></a>00493 {
 
379
<a name="l00494"></a>00494     *<span class="keyword">this</span> = *<span class="keyword">this</span> &amp; other;
 
380
<a name="l00495"></a>00495     <span class="keywordflow">return</span> *<span class="keyword">this</span>;
 
381
<a name="l00496"></a>00496 }
 
382
<a name="l00497"></a>00497 
 
383
<a name="l00499"></a>00499 <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> QwtDoubleRect::center()<span class="keyword"> const</span>
 
384
<a name="l00500"></a>00500 <span class="keyword"></span>{
 
385
<a name="l00501"></a>00501     <span class="keywordflow">return</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a>(d_left + (d_right - d_left) / 2.0, 
 
386
<a name="l00502"></a>00502         d_top + (d_bottom - d_top) / 2.0);
 
387
<a name="l00503"></a>00503 }
 
388
<a name="l00504"></a>00504 
 
389
<a name="l00512"></a>00512 <span class="keywordtype">bool</span> QwtDoubleRect::contains(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">bool</span> proper)<span class="keyword"> const</span>
 
390
<a name="l00513"></a>00513 <span class="keyword"></span>{
 
391
<a name="l00514"></a>00514     <span class="keywordflow">if</span> ( proper )
 
392
<a name="l00515"></a>00515         <span class="keywordflow">return</span> x &gt; d_left &amp;&amp; x &lt; d_right &amp;&amp; y &gt; d_top &amp;&amp; y &lt; d_bottom;
 
393
<a name="l00516"></a>00516     <span class="keywordflow">else</span>
 
394
<a name="l00517"></a>00517         <span class="keywordflow">return</span> x &gt;= d_left &amp;&amp; x &lt;= d_right &amp;&amp; y &gt;= d_top &amp;&amp; y &lt;= d_bottom;
 
395
<a name="l00518"></a>00518 }
 
396
<a name="l00519"></a>00519 
 
397
<a name="l00527"></a>00527 <span class="keywordtype">bool</span> QwtDoubleRect::contains(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;p, <span class="keywordtype">bool</span> proper)<span class="keyword"> const</span>
 
398
<a name="l00528"></a>00528 <span class="keyword"></span>{
 
399
<a name="l00529"></a>00529     <span class="keywordflow">return</span> contains(p.x(), p.y(), proper);
 
400
<a name="l00530"></a>00530 }
 
401
<a name="l00531"></a>00531 
 
402
<a name="l00539"></a>00539 <span class="keywordtype">bool</span> QwtDoubleRect::contains(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &amp;other, <span class="keywordtype">bool</span> proper)<span class="keyword"> const</span>
 
403
<a name="l00540"></a>00540 <span class="keyword"></span>{
 
404
<a name="l00541"></a>00541     <span class="keywordflow">return</span> contains(other.d_left, other.d_top, proper) &amp;&amp; 
 
405
<a name="l00542"></a>00542         contains(other.d_right, other.d_bottom, proper);
 
406
<a name="l00543"></a>00543 }
 
407
<a name="l00544"></a>00544 
 
408
<a name="l00546"></a>00546 <span class="keywordtype">void</span> QwtDoubleRect::moveLeft(<span class="keywordtype">double</span> x)
 
409
<a name="l00547"></a>00547 {
 
410
<a name="l00548"></a>00548     <span class="keyword">const</span> <span class="keywordtype">double</span> w = width();
 
411
<a name="l00549"></a>00549     d_left = x;
 
412
<a name="l00550"></a>00550     d_right = d_left + w;
 
413
<a name="l00551"></a>00551 }
 
414
<a name="l00552"></a>00552 
 
415
<a name="l00554"></a>00554 <span class="keywordtype">void</span> QwtDoubleRect::moveRight(<span class="keywordtype">double</span> x)
 
416
<a name="l00555"></a>00555 {
 
417
<a name="l00556"></a>00556     <span class="keyword">const</span> <span class="keywordtype">double</span> w = width();
 
418
<a name="l00557"></a>00557     d_right = x;
 
419
<a name="l00558"></a>00558     d_left = d_right - w;
 
420
<a name="l00559"></a>00559 }
 
421
<a name="l00560"></a>00560 
 
422
<a name="l00562"></a>00562 <span class="keywordtype">void</span> QwtDoubleRect::moveTop(<span class="keywordtype">double</span> y)
 
423
<a name="l00563"></a>00563 {
 
424
<a name="l00564"></a>00564     <span class="keyword">const</span> <span class="keywordtype">double</span> h = height();
 
425
<a name="l00565"></a>00565     d_top = y;
 
426
<a name="l00566"></a>00566     d_bottom = d_top + h;
 
427
<a name="l00567"></a>00567 }
 
428
<a name="l00568"></a>00568 
 
429
<a name="l00570"></a>00570 <span class="keywordtype">void</span> QwtDoubleRect::moveBottom(<span class="keywordtype">double</span> y)
 
430
<a name="l00571"></a>00571 {
 
431
<a name="l00572"></a>00572     <span class="keyword">const</span> <span class="keywordtype">double</span> h = height();
 
432
<a name="l00573"></a>00573     d_bottom = y;
 
433
<a name="l00574"></a>00574     d_top = d_bottom - h;
 
434
<a name="l00575"></a>00575 }
 
435
<a name="l00576"></a>00576 
 
436
<a name="l00578"></a>00578 <span class="keywordtype">void</span> QwtDoubleRect::moveTo(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y)
 
437
<a name="l00579"></a>00579 {
 
438
<a name="l00580"></a>00580     moveLeft(x);
 
439
<a name="l00581"></a>00581     moveTop(y);
 
440
<a name="l00582"></a>00582 }
 
441
<a name="l00583"></a>00583 
 
442
<a name="l00585"></a>00585 <span class="keywordtype">void</span> QwtDoubleRect::moveBy(<span class="keywordtype">double</span> dx, <span class="keywordtype">double</span> dy)
 
443
<a name="l00586"></a>00586 {
 
444
<a name="l00587"></a>00587     d_left += dx;
 
445
<a name="l00588"></a>00588     d_right += dx;
 
446
<a name="l00589"></a>00589     d_top += dy;
 
447
<a name="l00590"></a>00590     d_bottom += dy;
 
448
<a name="l00591"></a>00591 }
 
449
<a name="l00592"></a>00592 
 
450
<a name="l00594"></a>00594 <span class="keywordtype">void</span> QwtDoubleRect::moveCenter(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#5fdf5abc59b6e6cee5c11d355906927a">QwtDoublePoint</a> &amp;pos)
 
451
<a name="l00595"></a>00595 {
 
452
<a name="l00596"></a>00596     moveCenter(pos.x(), pos.y());
 
453
<a name="l00597"></a>00597 }
 
454
<a name="l00598"></a>00598 
 
455
<a name="l00600"></a>00600 <span class="keywordtype">void</span> QwtDoubleRect::moveCenter(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y)
 
456
<a name="l00601"></a>00601 {
 
457
<a name="l00602"></a>00602     moveTo(x - width() / 2.0, y - height() / 2.0);
 
458
<a name="l00603"></a>00603 }
 
459
<a name="l00604"></a>00604 
 
460
<a name="l00605"></a>00605 <span class="preprocessor">#endif // QT_VERSION &lt; 0x040000</span>
 
461
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Mar 22 16:54:07 2009 for Qwt User's Guide by&nbsp;
 
462
<a href="http://www.doxygen.org/index.html">
 
463
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>
 
464
</body>
 
465
</html>