File: planybmp_8h-source.html

package info (click to toggle)
paintlib 2.6.2-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,900 kB
  • ctags: 3,875
  • sloc: cpp: 25,209; sh: 10,600; ansic: 1,891; makefile: 119
file content (224 lines) | stat: -rw-r--r-- 14,511 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: planybmp.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a></div>
<h1>planybmp.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">/--------------------------------------------------------------------</span>
00003 <span class="comment">|</span>
00004 <span class="comment">|      $Id: planybmp_8h-source.html,v 1.4 2004/09/15 15:26:26 uzadow Exp $</span>
00005 <span class="comment">|</span>
00006 <span class="comment">|      Copyright (c) 1996-2002 Ulrich von Zadow</span>
00007 <span class="comment">|</span>
00008 <span class="comment">\--------------------------------------------------------------------</span>
00009 <span class="comment">*/</span>
00010 
00011 <span class="preprocessor">#ifndef INCL_PLANYBMP</span>
00012 <span class="preprocessor"></span><span class="preprocessor">#define INCL_PLANYBMP</span>
00013 <span class="preprocessor"></span>
00014 <span class="preprocessor">#ifndef INCL_PLBITMAP</span>
00015 <span class="preprocessor"></span><span class="preprocessor">#include "plbitmap.h"</span>
00016 <span class="preprocessor">#endif</span>
00017 <span class="preprocessor"></span><span class="comment"></span>
00018 <span class="comment">//! Manipulates uncompressed device- and platform-independent bitmaps.</span>
00019 <span class="comment">//! Supported data formats are 1, 8, 16, 24 and 32 bpp. The data is stored</span>
00020 <span class="comment">//! sequentially without padding in the bitmap. The class implements exactly</span>
00021 <span class="comment">//! the interface defined by PLBmp without additions.</span>
<a name="l00022"></a><a class="code" href="classPLAnyBmp.html">00022</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> : <span class="keyword">public</span> <a class="code" href="classPLBmp.html">PLBmp</a>
00023 {
00024 
00025 <span class="keyword">public</span>:<span class="comment"></span>
00026 <span class="comment">  //! Creates an empty bitmap.</span>
00027 <span class="comment"></span>  <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a>
00028     ();
00029 <span class="comment"></span>
00030 <span class="comment">  //! Destroys the bitmap.</span>
00031 <span class="comment"></span>  <span class="keyword">virtual</span> ~<a class="code" href="classPLAnyBmp.html">PLAnyBmp</a>
00032     ();
00033 <span class="comment"></span>
00034 <span class="comment">  //! Copy constructor</span>
00035 <span class="comment"></span>  <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a>
00036     ( <span class="keyword">const</span> <a class="code" href="classPLBmpBase.html">PLBmpBase</a> &amp;Orig
00037     );
00038 <span class="comment"></span>
00039 <span class="comment">  //! Copy constructor</span>
00040 <span class="comment"></span>  <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a>
00041     ( <span class="keyword">const</span> <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp;Orig
00042     );
00043 <span class="comment"></span>
00044 <span class="comment">  //! Assignment operator.</span>
00045 <span class="comment"></span>  <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp;<span class="keyword">operator</span>=
00046     ( <span class="keyword">const</span> <a class="code" href="classPLBmpBase.html">PLBmpBase</a> &amp;Orig
00047     );
00048 <span class="comment"></span>
00049 <span class="comment">  //! Assignment operator.</span>
00050 <span class="comment"></span>  <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp;<span class="keyword">operator</span>=
00051     ( <span class="keyword">const</span> <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp;Orig
00052     );
00053 
00054   <span class="comment">// PLAnyBmp information</span>
00055 <span class="comment"></span>
00056 <span class="comment">  //! Returns the amount of memory used by the object.</span>
00057 <span class="comment"></span>  <span class="keywordtype">long</span> <a class="code" href="classPLAnyBmp.html#a6">GetMemUsed</a>
00058     ();
00059 <span class="comment"></span>
00060 <span class="comment">  //! Returns number of bytes used per line.</span>
00061 <span class="comment"></span>  <span class="keywordtype">long</span> <a class="code" href="classPLAnyBmp.html#a7">GetBytesPerLine</a>
00062     ();
00063 <span class="comment"></span>
00064 <span class="comment">  //! Returns a raw pointer to the bitmap bits.</span>
00065 <span class="comment"></span>  PLBYTE * <a class="code" href="classPLAnyBmp.html#a8">GetPixels</a>
<a name="l00066"></a><a class="code" href="classPLAnyBmp.html#a8">00066</a>     ()
00067   { <span class="keywordflow">return</span> m_pBits; }
00068 <span class="comment"></span>
00069 <span class="comment">  //! Returns a raw pointer to the bitmap bits.</span>
00070 <span class="comment"></span>  <span class="keyword">const</span> PLBYTE * <a class="code" href="classPLAnyBmp.html#a8">GetPixels</a>
<a name="l00071"></a><a class="code" href="classPLAnyBmp.html#a9">00071</a>     () <span class="keyword">const</span> 
00072   { <span class="keywordflow">return</span> m_pBits; }
00073 
00074   <span class="comment">// Static functions</span>
00075 <span class="comment"></span>
00076 <span class="comment">  //! Returns memory needed by a bitmap with the specified attributes.</span>
00077 <span class="comment"></span>  <span class="keyword">static</span> <span class="keywordtype">long</span> <a class="code" href="classPLAnyBmp.html#e0">GetMemNeeded</a>
00078     ( PLLONG width,
00079       PLLONG height,
00080       PLWORD BitsPerPixel
00081     );
00082 <span class="comment"></span>
00083 <span class="comment">  //! Returns memory needed by bitmap bits.</span>
00084 <span class="comment"></span>  <span class="keyword">static</span> <span class="keywordtype">long</span> <a class="code" href="classPLAnyBmp.html#e1">GetBitsMemNeeded</a>
00085     ( PLLONG width,
00086       PLLONG height,
00087       PLWORD BitsPerPixel
00088     );
00089 
00090 
00091 <span class="keyword">protected</span>:
00092   <span class="comment">// Local functions</span>
00093 
00094   <span class="comment">// Create a new bitmap with uninitialized bits. Assumes no memory</span>
00095   <span class="comment">// is allocated yet.</span>
00096   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLAnyBmp.html#b0">internalCreate</a>
00097     ( PLLONG Width,
00098       PLLONG Height,
00099       <span class="keyword">const</span> PLPixelFormat&amp; pf
00100     );
00101 
00102   <span class="comment">// Deletes memory allocated by member variables.</span>
00103   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLAnyBmp.html#b1">freeMembers</a>
00104     ();
00105 
00106   <span class="comment">// Initializes internal table of line addresses.</span>
00107   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLAnyBmp.html#b2">initLineArray</a>
00108     ();
00109 
00110   PLBYTE      * m_pBits;        <span class="comment">// Pointer to the bits.</span>
00111 };
00112 
00113 <span class="comment">// Note that _both_ these copy constructors are needed. If only the</span>
00114 <span class="comment">// second one is there, MSVC 6.0 generates a default copy</span>
00115 <span class="comment">// constructor anyway :-(.</span>
00116 <span class="keyword">inline</span> <a class="code" href="classPLAnyBmp.html#a0">PLAnyBmp::PLAnyBmp</a>
<a name="l00117"></a><a class="code" href="classPLAnyBmp.html#a3">00117</a>     ( <span class="keyword">const</span> <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp;Orig
00118     )
00119     : <a class="code" href="classPLBmp.html">PLBmp</a> ()
00120 {
00121   internalCopy (Orig);
00122 }
00123 
00124 <span class="keyword">inline</span> <a class="code" href="classPLAnyBmp.html#a0">PLAnyBmp::PLAnyBmp</a>
<a name="l00125"></a><a class="code" href="classPLAnyBmp.html#a2">00125</a>     ( <span class="keyword">const</span> <a class="code" href="classPLBmpBase.html">PLBmpBase</a> &amp;Orig
00126     )
00127     : <a class="code" href="classPLBmp.html">PLBmp</a> ()
00128 {
00129   internalCopy (Orig);
00130 }
00131 
00132 <span class="keyword">inline</span> <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp; PLAnyBmp::operator=
<a name="l00133"></a><a class="code" href="classPLAnyBmp.html#a4">00133</a>     ( <span class="keyword">const</span> <a class="code" href="classPLBmpBase.html">PLBmpBase</a> &amp;Orig
00134     )
00135 {
00136   <a class="code" href="classPLBmp.html#a2">PLBmp::operator=</a>(Orig);
00137   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
00138 }
00139 
00140 <span class="keyword">inline</span> <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp; PLAnyBmp::operator=
<a name="l00141"></a><a class="code" href="classPLAnyBmp.html#a5">00141</a>     ( <span class="keyword">const</span> <a class="code" href="classPLAnyBmp.html">PLAnyBmp</a> &amp;Orig
00142     )
00143 {
00144   <a class="code" href="classPLBmp.html#a2">PLBmp::operator=</a>(Orig);
00145   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
00146 }
00147 
00148 
00149 <span class="preprocessor">#endif</span>
00150 <span class="preprocessor"></span><span class="comment">/*</span>
00151 <span class="comment">/--------------------------------------------------------------------</span>
00152 <span class="comment">|</span>
00153 <span class="comment">|      $Log: planybmp_8h-source.html,v $
00153 <span class="comment">|      Revision 1.4  2004/09/15 15:26:26  uzadow
00153 <span class="comment">|      Linux compatibility changes, doc update.
00153 <span class="comment">|</span>
00154 <span class="comment">|      Revision 1.10  2004/09/09 16:52:49  artcom</span>
00155 <span class="comment">|      refactored PixelFormat</span>
00156 <span class="comment">|</span>
00157 <span class="comment">|      Revision 1.9  2004/06/19 15:39:45  uzadow</span>
00158 <span class="comment">|      Bugfix</span>
00159 <span class="comment">|</span>
00160 <span class="comment">|      Revision 1.8  2004/06/15 14:17:11  uzadow</span>
00161 <span class="comment">|      First working version of PLSubBmp.</span>
00162 <span class="comment">|</span>
00163 <span class="comment">|      Revision 1.7  2004/06/15 11:18:17  uzadow</span>
00164 <span class="comment">|      First working version of PLBmpBase.</span>
00165 <span class="comment">|</span>
00166 <span class="comment">|      Revision 1.6  2004/06/06 12:56:38  uzadow</span>
00167 <span class="comment">|      Doxygenified documentation.</span>
00168 <span class="comment">|</span>
00169 <span class="comment">|      Revision 1.5  2003/02/15 21:26:58  uzadow</span>
00170 <span class="comment">|      Added win32 version of url data source.</span>
00171 <span class="comment">|</span>
00172 <span class="comment">|      Revision 1.4  2002/08/04 20:08:01  uzadow</span>
00173 <span class="comment">|      Added PLBmpInfo class, ability to extract metainformation from </span>
00174 <span class="comment">|      images without loading the whole image and proper greyscale support.</span>
00175 <span class="comment">|</span>
00176 <span class="comment">|      Revision 1.3  2002/02/24 13:00:17  uzadow</span>
00177 <span class="comment">|      Documentation update; removed buggy PLFilterRotate.</span>
00178 <span class="comment">|</span>
00179 <span class="comment">|      Revision 1.2  2001/10/06 22:03:26  uzadow</span>
00180 <span class="comment">|      Added PL prefix to basic data types.</span>
00181 <span class="comment">|</span>
00182 <span class="comment">|      Revision 1.1  2001/09/16 19:03:22  uzadow</span>
00183 <span class="comment">|      Added global name prefix PL, changed most filenames.</span>
00184 <span class="comment">|</span>
00185 <span class="comment">|      Revision 1.10  2001/01/15 15:05:31  uzadow</span>
00186 <span class="comment">|      Added PLBmp::ApplyFilter() and PLBmp::CreateFilteredCopy()</span>
00187 <span class="comment">|</span>
00188 <span class="comment">|      Revision 1.9  2000/11/02 21:28:47  uzadow</span>
00189 <span class="comment">|      Fixed copy constructors.</span>
00190 <span class="comment">|</span>
00191 <span class="comment">|      Revision 1.8  2000/08/13 12:11:43  Administrator</span>
00192 <span class="comment">|      Added experimental DirectDraw-Support</span>
00193 <span class="comment">|</span>
00194 <span class="comment">|      Revision 1.7  2000/01/16 20:43:12  anonymous</span>
00195 <span class="comment">|      Removed MFC dependencies</span>
00196 <span class="comment">|</span>
00197 <span class="comment">|      Revision 1.6  1999/12/14 12:30:13  Ulrich von Zadow</span>
00198 <span class="comment">|      Corrected copy constructor and assignment operator.</span>
00199 <span class="comment">|</span>
00200 <span class="comment">|      Revision 1.5  1999/12/10 01:27:26  Ulrich von Zadow</span>
00201 <span class="comment">|      Added assignment operator and copy constructor to</span>
00202 <span class="comment">|      bitmap classes.</span>
00203 <span class="comment">|</span>
00204 <span class="comment">|      Revision 1.4  1999/12/02 17:07:34  Ulrich von Zadow</span>
00205 <span class="comment">|      Changes by bdelmee.</span>
00206 <span class="comment">|</span>
00207 <span class="comment">\--------------------------------------------------------------------</span>
00208 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:40 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.2 </small></address>
</body>
</html>