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's Guide: qwt_plot_rasteritem.cpp Source File</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.0 -->
10
<li><a href="index.html"><span>Main 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 Pages</span></a></li>
17
<li><a href="files.html"><span>File List</span></a></li>
18
<li><a href="globals.html"><span>File Members</span></a></li>
20
<h1>qwt_plot_rasteritem.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 <qapplication.h></span>
30
<a name="l00011"></a>00011 <span class="preprocessor">#include <qdesktopwidget.h></span>
31
<a name="l00012"></a>00012 <span class="preprocessor">#include <qpaintdevice.h></span>
32
<a name="l00013"></a>00013 <span class="preprocessor">#include <qpainter.h></span>
33
<a name="l00014"></a>00014 <span class="preprocessor">#include "qwt_legend.h"</span>
34
<a name="l00015"></a>00015 <span class="preprocessor">#include "qwt_legend_item.h"</span>
35
<a name="l00016"></a>00016 <span class="preprocessor">#include "qwt_scale_map.h"</span>
36
<a name="l00017"></a>00017 <span class="preprocessor">#include "qwt_plot_rasteritem.h"</span>
37
<a name="l00018"></a>00018
38
<a name="l00019"></a>00019 <span class="keyword">class </span>QwtPlotRasterItem::PrivateData
39
<a name="l00020"></a>00020 {
40
<a name="l00021"></a>00021 <span class="keyword">public</span>:
41
<a name="l00022"></a>00022 PrivateData():
42
<a name="l00023"></a>00023 <a class="code" href="class_qwt_plot_raster_item.html#6a8ee7f74861bf13335044810174bd3c">alpha</a>(-1)
43
<a name="l00024"></a>00024 {
44
<a name="l00025"></a>00025 cache.policy = QwtPlotRasterItem::NoCache;
45
<a name="l00026"></a>00026 }
46
<a name="l00027"></a>00027
47
<a name="l00028"></a>00028 <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_raster_item.html#6a8ee7f74861bf13335044810174bd3c">alpha</a>;
48
<a name="l00029"></a>00029
49
<a name="l00030"></a>00030 <span class="keyword">struct </span>ImageCache
50
<a name="l00031"></a>00031 {
51
<a name="l00032"></a>00032 <a class="code" href="class_qwt_plot_raster_item.html#94929fc4c31c3dab75ee5adcac2d57b0">QwtPlotRasterItem::CachePolicy</a> policy;
52
<a name="l00033"></a>00033 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> rect;
53
<a name="l00034"></a>00034 QSize size;
54
<a name="l00035"></a>00035 QImage image;
55
<a name="l00036"></a>00036 } cache;
56
<a name="l00037"></a>00037 };
57
<a name="l00038"></a>00038
58
<a name="l00039"></a>00039 <span class="keyword">static</span> QImage toRgba(<span class="keyword">const</span> QImage& image, <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_raster_item.html#6a8ee7f74861bf13335044810174bd3c">alpha</a>)
59
<a name="l00040"></a>00040 {
60
<a name="l00041"></a>00041 <span class="keywordflow">if</span> ( alpha < 0 || alpha >= 255 )
61
<a name="l00042"></a>00042 <span class="keywordflow">return</span> image;
62
<a name="l00043"></a>00043
63
<a name="l00044"></a>00044 <span class="preprocessor">#if QT_VERSION < 0x040000</span>
64
<a name="l00045"></a>00045 <span class="preprocessor"></span> QImage alphaImage(image.size(), 32);
65
<a name="l00046"></a>00046 alphaImage.setAlphaBuffer(<span class="keyword">true</span>);
66
<a name="l00047"></a>00047 <span class="preprocessor">#else</span>
67
<a name="l00048"></a>00048 <span class="preprocessor"></span> QImage alphaImage(image.size(), QImage::Format_ARGB32);
68
<a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
69
<a name="l00050"></a>00050 <span class="preprocessor"></span>
70
<a name="l00051"></a>00051 <span class="keyword">const</span> QRgb mask1 = qRgba(0, 0, 0, alpha);
71
<a name="l00052"></a>00052 <span class="keyword">const</span> QRgb mask2 = qRgba(255, 255, 255, 0);
72
<a name="l00053"></a>00053 <span class="keyword">const</span> QRgb mask3 = qRgba(0, 0, 0, 255);
73
<a name="l00054"></a>00054
74
<a name="l00055"></a>00055 <span class="keyword">const</span> <span class="keywordtype">int</span> w = image.size().width();
75
<a name="l00056"></a>00056 <span class="keyword">const</span> <span class="keywordtype">int</span> h = image.size().height();
76
<a name="l00057"></a>00057
77
<a name="l00058"></a>00058 <span class="keywordflow">if</span> ( image.depth() == 8 )
78
<a name="l00059"></a>00059 {
79
<a name="l00060"></a>00060 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> y = 0; y < h; y++ )
80
<a name="l00061"></a>00061 {
81
<a name="l00062"></a>00062 QRgb* alphaLine = (QRgb*)alphaImage.scanLine(y);
82
<a name="l00063"></a>00063 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *line = image.scanLine(y);
83
<a name="l00064"></a>00064
84
<a name="l00065"></a>00065 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> x = 0; x < w; x++ )
85
<a name="l00066"></a>00066 *alphaLine++ = (image.color(*line++) & mask2) | mask1;
86
<a name="l00067"></a>00067 }
87
<a name="l00068"></a>00068 }
88
<a name="l00069"></a>00069 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( image.depth() == 32 )
89
<a name="l00070"></a>00070 {
90
<a name="l00071"></a>00071 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> y = 0; y < h; y++ )
91
<a name="l00072"></a>00072 {
92
<a name="l00073"></a>00073 QRgb* alphaLine = (QRgb*)alphaImage.scanLine(y);
93
<a name="l00074"></a>00074 <span class="keyword">const</span> QRgb* line = (<span class="keyword">const</span> QRgb*) image.scanLine(y);
94
<a name="l00075"></a>00075
95
<a name="l00076"></a>00076 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> x = 0; x < w; x++ )
96
<a name="l00077"></a>00077 {
97
<a name="l00078"></a>00078 <span class="keyword">const</span> QRgb rgb = *line++;
98
<a name="l00079"></a>00079 <span class="keywordflow">if</span> ( rgb & mask3 ) <span class="comment">// alpha != 0</span>
99
<a name="l00080"></a>00080 *alphaLine++ = (rgb & mask2) | mask1;
100
<a name="l00081"></a>00081 <span class="keywordflow">else</span>
101
<a name="l00082"></a>00082 *alphaLine++ = rgb;
102
<a name="l00083"></a>00083 }
103
<a name="l00084"></a>00084 }
104
<a name="l00085"></a>00085 }
105
<a name="l00086"></a>00086
106
<a name="l00087"></a>00087 <span class="keywordflow">return</span> alphaImage;
107
<a name="l00088"></a>00088 }
108
<a name="l00089"></a>00089
109
<a name="l00091"></a><a class="code" href="class_qwt_plot_raster_item.html#2149c1d6b71c607027345a9a51ef3314">00091</a> <a class="code" href="class_qwt_plot_raster_item.html#2149c1d6b71c607027345a9a51ef3314">QwtPlotRasterItem::QwtPlotRasterItem</a>(<span class="keyword">const</span> QString& <a class="code" href="class_qwt_plot_item.html#3abdb947d71e457de120851922de3197">title</a>):
110
<a name="l00092"></a>00092 <a class="code" href="class_qwt_plot_item.html">QwtPlotItem</a>(<a class="code" href="class_qwt_text.html">QwtText</a>(title))
111
<a name="l00093"></a>00093 {
112
<a name="l00094"></a>00094 init();
113
<a name="l00095"></a>00095 }
114
<a name="l00096"></a>00096
115
<a name="l00098"></a><a class="code" href="class_qwt_plot_raster_item.html#f487c6abc8e95200d4537d1373f96be5">00098</a> <a class="code" href="class_qwt_plot_raster_item.html#2149c1d6b71c607027345a9a51ef3314">QwtPlotRasterItem::QwtPlotRasterItem</a>(<span class="keyword">const</span> <a class="code" href="class_qwt_text.html">QwtText</a>& title):
116
<a name="l00099"></a>00099 <a class="code" href="class_qwt_plot_item.html">QwtPlotItem</a>(title)
117
<a name="l00100"></a>00100 {
118
<a name="l00101"></a>00101 init();
119
<a name="l00102"></a>00102 }
120
<a name="l00103"></a>00103
121
<a name="l00105"></a><a class="code" href="class_qwt_plot_raster_item.html#2715233827c346ab15504dc75d6e9714">00105</a> <a class="code" href="class_qwt_plot_raster_item.html#2715233827c346ab15504dc75d6e9714">QwtPlotRasterItem::~QwtPlotRasterItem</a>()
122
<a name="l00106"></a>00106 {
123
<a name="l00107"></a>00107 <span class="keyword">delete</span> d_data;
124
<a name="l00108"></a>00108 }
125
<a name="l00109"></a>00109
126
<a name="l00110"></a>00110 <span class="keywordtype">void</span> QwtPlotRasterItem::init()
127
<a name="l00111"></a>00111 {
128
<a name="l00112"></a>00112 d_data = <span class="keyword">new</span> PrivateData();
129
<a name="l00113"></a>00113
130
<a name="l00114"></a>00114 <a class="code" href="class_qwt_plot_item.html#5a335be8ff488809a2cf7f4b734ad1b6">setItemAttribute</a>(QwtPlotItem::AutoScale, <span class="keyword">true</span>);
131
<a name="l00115"></a>00115 <a class="code" href="class_qwt_plot_item.html#5a335be8ff488809a2cf7f4b734ad1b6">setItemAttribute</a>(QwtPlotItem::Legend, <span class="keyword">false</span>);
132
<a name="l00116"></a>00116
133
<a name="l00117"></a>00117 <a class="code" href="class_qwt_plot_item.html#57d90e4146133b59d589c71b3a643e82">setZ</a>(8.0);
134
<a name="l00118"></a>00118 }
135
<a name="l00119"></a>00119
136
<a name="l00143"></a><a class="code" href="class_qwt_plot_raster_item.html#14f2ab8ec0994384e6269f869c352273">00143</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_raster_item.html#14f2ab8ec0994384e6269f869c352273">QwtPlotRasterItem::setAlpha</a>(<span class="keywordtype">int</span> alpha)
137
<a name="l00144"></a>00144 {
138
<a name="l00145"></a>00145 <span class="keywordflow">if</span> ( alpha < 0 )
139
<a name="l00146"></a>00146 alpha = -1;
140
<a name="l00147"></a>00147
141
<a name="l00148"></a>00148 <span class="keywordflow">if</span> ( alpha > 255 )
142
<a name="l00149"></a>00149 alpha = 255;
143
<a name="l00150"></a>00150
144
<a name="l00151"></a>00151 <span class="keywordflow">if</span> ( alpha != d_data->alpha )
145
<a name="l00152"></a>00152 {
146
<a name="l00153"></a>00153 d_data->alpha = alpha;
147
<a name="l00154"></a>00154
148
<a name="l00155"></a>00155 <a class="code" href="class_qwt_plot_item.html#d956fdbce5b0721abccce6d09fe4d5ce">itemChanged</a>();
149
<a name="l00156"></a>00156 }
150
<a name="l00157"></a>00157 }
151
<a name="l00158"></a>00158
152
<a name="l00163"></a><a class="code" href="class_qwt_plot_raster_item.html#6a8ee7f74861bf13335044810174bd3c">00163</a> <span class="keywordtype">int</span> <a class="code" href="class_qwt_plot_raster_item.html#6a8ee7f74861bf13335044810174bd3c">QwtPlotRasterItem::alpha</a>()<span class="keyword"> const</span>
153
<a name="l00164"></a>00164 <span class="keyword"></span>{
154
<a name="l00165"></a>00165 <span class="keywordflow">return</span> d_data->alpha;
155
<a name="l00166"></a>00166 }
156
<a name="l00167"></a>00167
157
<a name="l00176"></a><a class="code" href="class_qwt_plot_raster_item.html#31f74199f7e333c2683b0f18289e4c7f">00176</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_raster_item.html#31f74199f7e333c2683b0f18289e4c7f">QwtPlotRasterItem::setCachePolicy</a>(
158
<a name="l00177"></a>00177 <a class="code" href="class_qwt_plot_raster_item.html#94929fc4c31c3dab75ee5adcac2d57b0">QwtPlotRasterItem::CachePolicy</a> policy)
159
<a name="l00178"></a>00178 {
160
<a name="l00179"></a>00179 <span class="keywordflow">if</span> ( d_data->cache.policy != policy )
161
<a name="l00180"></a>00180 {
162
<a name="l00181"></a>00181 d_data->cache.policy = policy;
163
<a name="l00182"></a>00182
164
<a name="l00183"></a>00183 <a class="code" href="class_qwt_plot_raster_item.html#547ce4d8d031b230226cfbd509ef65b5">invalidateCache</a>();
165
<a name="l00184"></a>00184 <a class="code" href="class_qwt_plot_item.html#d956fdbce5b0721abccce6d09fe4d5ce">itemChanged</a>();
166
<a name="l00185"></a>00185 }
167
<a name="l00186"></a>00186 }
168
<a name="l00187"></a>00187
169
<a name="l00192"></a><a class="code" href="class_qwt_plot_raster_item.html#ec74de65bf6b566afd52db6dc4c67c46">00192</a> <a class="code" href="class_qwt_plot_raster_item.html#94929fc4c31c3dab75ee5adcac2d57b0">QwtPlotRasterItem::CachePolicy</a> <a class="code" href="class_qwt_plot_raster_item.html#ec74de65bf6b566afd52db6dc4c67c46">QwtPlotRasterItem::cachePolicy</a>()<span class="keyword"> const</span>
170
<a name="l00193"></a>00193 <span class="keyword"></span>{
171
<a name="l00194"></a>00194 <span class="keywordflow">return</span> d_data->cache.policy;
172
<a name="l00195"></a>00195 }
173
<a name="l00196"></a>00196
174
<a name="l00201"></a><a class="code" href="class_qwt_plot_raster_item.html#547ce4d8d031b230226cfbd509ef65b5">00201</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_raster_item.html#547ce4d8d031b230226cfbd509ef65b5">QwtPlotRasterItem::invalidateCache</a>()
175
<a name="l00202"></a>00202 {
176
<a name="l00203"></a>00203 d_data->cache.image = QImage();
177
<a name="l00204"></a>00204 d_data->cache.rect = <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a>();
178
<a name="l00205"></a>00205 d_data->cache.size = QSize();
179
<a name="l00206"></a>00206 }
180
<a name="l00207"></a>00207
181
<a name="l00217"></a><a class="code" href="class_qwt_plot_raster_item.html#b608eda9778ea870b07db2209e77cc3d">00217</a> QSize <a class="code" href="class_qwt_plot_raster_item.html#b608eda9778ea870b07db2209e77cc3d">QwtPlotRasterItem::rasterHint</a>(<span class="keyword">const</span> <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> &)<span class="keyword"> const</span>
182
<a name="l00218"></a>00218 <span class="keyword"></span>{
183
<a name="l00219"></a>00219 <span class="keywordflow">return</span> QSize();
184
<a name="l00220"></a>00220 }
185
<a name="l00221"></a>00221
186
<a name="l00229"></a><a class="code" href="class_qwt_plot_raster_item.html#a8051353a68ab08b5962b0664e2c89d4">00229</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_raster_item.html#a8051353a68ab08b5962b0664e2c89d4">QwtPlotRasterItem::draw</a>(QPainter *painter,
187
<a name="l00230"></a>00230 <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a> &xMap, <span class="keyword">const</span> <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a> &yMap,
188
<a name="l00231"></a>00231 <span class="keyword">const</span> QRect &canvasRect)<span class="keyword"> const</span>
189
<a name="l00232"></a>00232 <span class="keyword"></span>{
190
<a name="l00233"></a>00233 <span class="keywordflow">if</span> ( canvasRect.isEmpty() || d_data->alpha == 0 )
191
<a name="l00234"></a>00234 <span class="keywordflow">return</span>;
192
<a name="l00235"></a>00235
193
<a name="l00236"></a>00236 <a class="code" href="qwt__double__rect_8h.html#0c0dc4d33592fac4ad94734d8e9c4152">QwtDoubleRect</a> area = <a class="code" href="class_qwt_plot_item.html#01bc8299a1e06eac29907d717dede51a">invTransform</a>(xMap, yMap, canvasRect);
194
<a name="l00237"></a>00237 <span class="keywordflow">if</span> ( <a class="code" href="class_qwt_plot_item.html#aa0d61c721363671e1a1912cd4b8d4a7">boundingRect</a>().isValid() )
195
<a name="l00238"></a>00238 area &= <a class="code" href="class_qwt_plot_item.html#aa0d61c721363671e1a1912cd4b8d4a7">boundingRect</a>();
196
<a name="l00239"></a>00239
197
<a name="l00240"></a>00240 <span class="keyword">const</span> QRect <a class="code" href="class_qwt_plot_item.html#d0b1c45a2c0a6807a85e2201b99737f2">paintRect</a> = <a class="code" href="class_qwt_plot_item.html#9adba4c37682d216740c714d23e97b53">transform</a>(xMap, yMap, area);
198
<a name="l00241"></a>00241 <span class="keywordflow">if</span> ( !paintRect.isValid() )
199
<a name="l00242"></a>00242 <span class="keywordflow">return</span>;
200
<a name="l00243"></a>00243
201
<a name="l00244"></a>00244 QImage image;
202
<a name="l00245"></a>00245
203
<a name="l00246"></a>00246 <span class="keywordtype">bool</span> doCache = <span class="keyword">true</span>;
204
<a name="l00247"></a>00247 <span class="keywordflow">if</span> ( painter->device()->devType() == QInternal::Printer
205
<a name="l00248"></a>00248 || painter->device()->devType() == QInternal::Picture )
206
<a name="l00249"></a>00249 {
207
<a name="l00250"></a>00250 doCache = <span class="keyword">false</span>;
208
<a name="l00251"></a>00251 }
209
<a name="l00252"></a>00252
210
<a name="l00253"></a>00253 <span class="keywordflow">if</span> ( !doCache || d_data->cache.policy == NoCache )
211
<a name="l00254"></a>00254 {
212
<a name="l00255"></a>00255 image = <a class="code" href="class_qwt_plot_raster_item.html#934080bd84c334df24eb50ddfcc1e8db">renderImage</a>(xMap, yMap, area);
213
<a name="l00256"></a>00256 <span class="keywordflow">if</span> ( d_data->alpha >= 0 && d_data->alpha < 255 )
214
<a name="l00257"></a>00257 image = toRgba(image, d_data->alpha);
215
<a name="l00258"></a>00258
216
<a name="l00259"></a>00259 }
217
<a name="l00260"></a>00260 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( d_data->cache.policy == PaintCache )
218
<a name="l00261"></a>00261 {
219
<a name="l00262"></a>00262 <span class="keywordflow">if</span> ( d_data->cache.image.isNull() || d_data->cache.rect != area
220
<a name="l00263"></a>00263 || d_data->cache.size != paintRect.size() )
221
<a name="l00264"></a>00264 {
222
<a name="l00265"></a>00265 d_data->cache.image = <a class="code" href="class_qwt_plot_raster_item.html#934080bd84c334df24eb50ddfcc1e8db">renderImage</a>(xMap, yMap, area);
223
<a name="l00266"></a>00266 d_data->cache.rect = area;
224
<a name="l00267"></a>00267 d_data->cache.size = paintRect.size();
225
<a name="l00268"></a>00268 }
226
<a name="l00269"></a>00269
227
<a name="l00270"></a>00270 image = d_data->cache.image;
228
<a name="l00271"></a>00271 <span class="keywordflow">if</span> ( d_data->alpha >= 0 && d_data->alpha < 255 )
229
<a name="l00272"></a>00272 image = toRgba(image, d_data->alpha);
230
<a name="l00273"></a>00273 }
231
<a name="l00274"></a>00274 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( d_data->cache.policy == ScreenCache )
232
<a name="l00275"></a>00275 {
233
<a name="l00276"></a>00276 <span class="keyword">const</span> QSize screenSize =
234
<a name="l00277"></a>00277 QApplication::desktop()->screenGeometry().size();
235
<a name="l00278"></a>00278
236
<a name="l00279"></a>00279 <span class="keywordflow">if</span> ( paintRect.width() > screenSize.width() ||
237
<a name="l00280"></a>00280 paintRect.height() > screenSize.height() )
238
<a name="l00281"></a>00281 {
239
<a name="l00282"></a>00282 image = <a class="code" href="class_qwt_plot_raster_item.html#934080bd84c334df24eb50ddfcc1e8db">renderImage</a>(xMap, yMap, area);
240
<a name="l00283"></a>00283 }
241
<a name="l00284"></a>00284 <span class="keywordflow">else</span>
242
<a name="l00285"></a>00285 {
243
<a name="l00286"></a>00286 <span class="keywordflow">if</span> ( d_data->cache.image.isNull() || d_data->cache.rect != area )
244
<a name="l00287"></a>00287 {
245
<a name="l00288"></a>00288 <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a> cacheXMap = xMap;
246
<a name="l00289"></a>00289 cacheXMap.<a class="code" href="class_qwt_scale_map.html#a9a63a0b2e4ff81b1df23d9f968cd5b8">setPaintInterval</a>( 0, screenSize.width());
247
<a name="l00290"></a>00290
248
<a name="l00291"></a>00291 <a class="code" href="class_qwt_scale_map.html">QwtScaleMap</a> cacheYMap = yMap;
249
<a name="l00292"></a>00292 cacheYMap.<a class="code" href="class_qwt_scale_map.html#a9a63a0b2e4ff81b1df23d9f968cd5b8">setPaintInterval</a>(screenSize.height(), 0);
250
<a name="l00293"></a>00293
251
<a name="l00294"></a>00294 d_data->cache.image = <a class="code" href="class_qwt_plot_raster_item.html#934080bd84c334df24eb50ddfcc1e8db">renderImage</a>(
252
<a name="l00295"></a>00295 cacheXMap, cacheYMap, area);
253
<a name="l00296"></a>00296 d_data->cache.rect = area;
254
<a name="l00297"></a>00297 d_data->cache.size = paintRect.size();
255
<a name="l00298"></a>00298 }
256
<a name="l00299"></a>00299
257
<a name="l00300"></a>00300 image = d_data->cache.image;
258
<a name="l00301"></a>00301 }
259
<a name="l00302"></a>00302 image = toRgba(image, d_data->alpha);
260
<a name="l00303"></a>00303 }
261
<a name="l00304"></a>00304
262
<a name="l00305"></a>00305 painter->drawImage(paintRect, image);
263
<a name="l00306"></a>00306 }
264
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Mar 22 16:54:08 2009 for Qwt User's Guide by
265
<a href="http://www.doxygen.org/index.html">
266
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>