MWAWPictBitmap.hxx Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

MWAWPictBitmap.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libmwaw
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33
34 /* This header contains code specific to some bitmap
35 */
36
37 #ifndef MWAW_PICT_BITMAP
38 # define MWAW_PICT_BITMAP
39
40 #include <assert.h>
41
42 #include <vector>
43
44 #include "libmwaw_internal.hxx"
45 #include "MWAWPict.hxx"
46
48 //
49 // Some container
50 //
52
54 template <class T> class MWAWPictBitmapContainer
55 {
56 public:
58 MWAWPictBitmapContainer(Vec2i const &sz) : m_size(sz), m_data(0L)
59 {
60 if (m_size[0]*m_size[1] == 0) return;
61 m_data = new T[size_t(m_size[0]*m_size[1])];
62 std::uninitialized_fill_n(m_data, m_size[0] * m_size[1], T());
63 }
65 virtual ~MWAWPictBitmapContainer()
66 {
67 if (m_data) delete [] m_data;
68 }
69
71 bool ok() const
72 {
73 return (m_data != 0L);
74 }
75
77 int cmp(MWAWPictBitmapContainer<T> const &orig) const
78 {
79 int diff = m_size.cmpY(orig.m_size);
80 if (diff) return diff;
81 if (!m_data) return orig.m_data ? 1 : 0;
82 if (!orig.m_data) return -1;
83 for (int i=0; i < m_size[0]*m_size[1]; i++) {
84 if (m_data[i] < orig.m_data[i]) return -1;
85 if (m_data[i] > orig.m_data[i]) return 1;
86 }
87 return 0;
88 }
90 Vec2i const &size() const
91 {
92 return m_size;
93 }
95 int numRows() const
96 {
97 return m_size[0];
98 }
100 int numColumns() const
101 {
102 return m_size[1];
103 }
104
106 T const &get(int i, int j) const
107 {
108 assert(m_data != 0L && i>=0 && i < m_size[0] && j>=0 && j < m_size[1]);
109 return m_data[i+m_size[0]*j];
110 }
112 T const *getRow(int j) const
113 {
114 assert(m_data != 0L && j>=0 && j < m_size[1]);
115 return m_data+m_size[0]*j;
116 }
117
119 void set(int i, int j, T const &v)
120 {
121 assert(m_data != 0L && i>=0 && i < m_size[0] && j>=0 && j < m_size[1]);
122 m_data[i+j*m_size[0]] = v;
123 }
124
126 template <class U>
127 void setRow(int j, U const *val)
128 {
129 assert(m_data != 0L && j>=0 && j < m_size[1]);
130 for (int i = 0, ind=j*m_size[0]; i < m_size[0]; i++, ind++) m_data[ind] = T(val[i]);
131 }
132
134 template <class U>
135 void setColumn(int i, U const *val)
136 {
137 assert(m_data != 0L && i>=0 && i < m_size[0]);
138 for (int j = 0, ind=i; j < m_size[1]; j++, ind+=m_size[0]) m_data[ind] = T(val[i]);
139 }
140
141 private:
142 MWAWPictBitmapContainer(MWAWPictBitmapContainer const &orig);
143 MWAWPictBitmapContainer &operator=(MWAWPictBitmapContainer const &orig);
144 protected:
146 Vec2i m_size;
148 T *m_data;
149 };
150
152 class MWAWPictBitmapContainerBool : public MWAWPictBitmapContainer<bool>
153 {
154 public:
156 MWAWPictBitmapContainerBool(Vec2i const &sz) : MWAWPictBitmapContainer<bool>(sz) {}
157
159 int cmp(MWAWPictBitmapContainerBool const &orig) const
160 {
161 int diff = m_size.cmpY(orig.m_size);
162 if (diff) return diff;
163 if (!m_data) return orig.m_data ? 1 : 0;
164 if (!orig.m_data) return -1;
165 for (int i=0; i < m_size[0]*m_size[1]; i++) {
166 if (m_data[i] == orig.m_data[i]) continue;
167 return m_data[i] ? 1 : -1;
168 }
169 return 0;
170 }
171
173 void setRowPacked(int j, unsigned char const *val)
174 {
175 assert(m_data != 0L && j>=0 && j < m_size[1]);
176 for (int i = 0, ind = j*m_size[0]; i < m_size[0];) {
177 unsigned char v = *(val++);
178 unsigned char mask = 0x80;
179 for (int p = 0; p < 8 && i < m_size[0]; i++, p++, ind++) {
180 m_data[ind] = ((v&mask) != 0);
181 mask = (unsigned char)(mask >> 1);
182 }
183 }
184 }
185 };
186
188 class MWAWPictBitmap : public MWAWPict
189 {
190 public:
192 enum SubType { BW, Indexed, Color };
194 virtual Type getType() const
195 {
196 return MWAWPict::Bitmap;
197 }
199 virtual SubType getSubType() const = 0;
200
202 virtual bool getBinary(librevenge::RVNGBinaryData &res, std::string &s) const
203 {
204 if (!valid()) return false;
205
206 s = "image/pict";
207 createFileData(res);
208 return true;
209 }
210
212 virtual bool valid() const
213 {
214 return false;
215 }
216
219 virtual int cmp(MWAWPict const &a) const
220 {
221 int diff = MWAWPict::cmp(a);
222 if (diff) return diff;
223 MWAWPictBitmap const &aPict = static_cast<MWAWPictBitmap const &>(a);
224
225 // the type
226 diff = getSubType() - aPict.getSubType();
227 if (diff) return (diff < 0) ? -1 : 1;
228
229 return 0;
230 }
231
232 protected:
234 virtual bool createFileData(librevenge::RVNGBinaryData &result) const = 0;
235
237 MWAWPictBitmap(Vec2i const &sz)
238 {
239 setBdBox(Box2f(Vec2f(0,0), sz));
240 }
241 };
242
244 class MWAWPictBitmapBW : public MWAWPictBitmap
245 {
246 public:
248 virtual SubType getSubType() const
249 {
250 return BW;
251 }
252
255 virtual int cmp(MWAWPict const &a) const
256 {
257 int diff = MWAWPictBitmap::cmp(a);
258 if (diff) return diff;
259 MWAWPictBitmapBW const &aPict = static_cast<MWAWPictBitmapBW const &>(a);
260
261 return m_data.cmp(aPict.m_data);
262 }
263
265 virtual bool valid() const
266 {
267 return m_data.ok();
268 }
269
271 MWAWPictBitmapBW(Vec2i const &sz) : MWAWPictBitmap(sz), m_data(sz) { }
272
274 Vec2i const &size() const
275 {
276 return m_data.size();
277 }
279 int numRows() const
280 {
281 return m_data.numRows();
282 }
284 int numColumns() const
285 {
286 return m_data.numColumns();
287 }
289 bool get(int i, int j) const
290 {
291 return m_data.get(i,j);
292 }
294 bool const *getRow(int j) const
295 {
296 return m_data.getRow(j);
297 }
299 void set(int i, int j, bool v)
300 {
301 m_data.set(i,j, v);
302 }
304 void setRow(int j, bool const *val)
305 {
306 m_data.setRow(j, val);
307 }
309 void setRowPacked(int j, unsigned char const *val)
310 {
311 m_data.setRowPacked(j, val);
312 }
314 void setColumn(int i, bool const *val)
315 {
316 m_data.setColumn(i, val);
317 }
318
319 protected:
321 virtual bool createFileData(librevenge::RVNGBinaryData &result) const;
322
324 MWAWPictBitmapContainerBool m_data;
325 };
326
328 class MWAWPictBitmapIndexed : public MWAWPictBitmap
329 {
330 public:
332 virtual SubType getSubType() const
333 {
334 return Indexed;
335 }
336
339 virtual int cmp(MWAWPict const &a) const
340 {
341 int diff = MWAWPictBitmap::cmp(a);
342 if (diff) return diff;
343 MWAWPictBitmapIndexed const &aPict = static_cast<MWAWPictBitmapIndexed const &>(a);
344
345 diff=int(m_colors.size())-int(aPict.m_colors.size());
346 if (diff) return (diff < 0) ? -1 : 1;
347 for (size_t c=0; c < m_colors.size(); c++) {
348 if (m_colors[c] < aPict.m_colors[c])
349 return 1;
350 if (m_colors[c] > aPict.m_colors[c])
351 return -1;
352 }
353 return m_data.cmp(aPict.m_data);
354 }
355
357 virtual bool valid() const
358 {
359 return m_data.ok();
360 }
361
363 MWAWPictBitmapIndexed(Vec2i const &sz) : MWAWPictBitmap(sz), m_data(sz), m_colors() { }
364
366 Vec2i const &size() const
367 {
368 return m_data.size();
369 }
371 int numRows() const
372 {
373 return m_data.numRows();
374 }
376 int numColumns() const
377 {
378 return m_data.numColumns();
379 }
381 int get(int i, int j) const
382 {
383 return m_data.get(i,j);
384 }
386 int const *getRow(int j) const
387 {
388 return m_data.getRow(j);
389 }
390
392 void set(int i, int j, int v)
393 {
394 m_data.set(i,j, v);
395 }
397 template <class U> void setRow(int j, U const *val)
398 {
399 m_data.setRow(j, val);
400 }
402 template <class U> void setColumn(int i, U const *val)
403 {
404 m_data.setColumn(i, val);
405 }
406
408 std::vector<MWAWColor> const &getColors() const
409 {
410 return m_colors;
411 }
413 void setColors(std::vector<MWAWColor> const &cols)
414 {
415 m_colors = cols;
416 }
417
418 protected:
420 virtual bool createFileData(librevenge::RVNGBinaryData &result) const;
421
423 MWAWPictBitmapContainer<int> m_data;
425 std::vector<MWAWColor> m_colors;
426 };
427
435 class MWAWPictBitmapColor : public MWAWPictBitmap
436 {
437 public:
439 virtual SubType getSubType() const
440 {
441 return Indexed;
442 }
443
446 virtual int cmp(MWAWPict const &a) const
447 {
448 int diff = MWAWPictBitmap::cmp(a);
449 if (diff) return diff;
450 MWAWPictBitmapColor const &aPict = static_cast<MWAWPictBitmapColor const &>(a);
451
452 return m_data.cmp(aPict.m_data);
453 }
454
456 virtual bool valid() const
457 {
458 return m_data.ok();
459 }
460
462 MWAWPictBitmapColor(Vec2i const &sz, bool useAlphaChannel=false) : MWAWPictBitmap(sz), m_data(sz), m_hasAlpha(useAlphaChannel) { }
463
465 Vec2i const &size() const
466 {
467 return m_data.size();
468 }
470 int numRows() const
471 {
472 return m_data.numRows();
473 }
475 int numColumns() const
476 {
477 return m_data.numColumns();
478 }
480 MWAWColor get(int i, int j) const
481 {
482 return m_data.get(i,j);
483 }
485 MWAWColor const *getRow(int j) const
486 {
487 return m_data.getRow(j);
488 }
489
491 void set(int i, int j, MWAWColor const &v)
492 {
493 m_data.set(i,j, v);
494 }
496 void setRow(int j, MWAWColor const *val)
497 {
498 m_data.setRow(j, val);
499 }
501 void setColumn(int i, MWAWColor const *val)
502 {
503 m_data.setColumn(i, val);
504 }
505
506 protected:
508 virtual bool createFileData(librevenge::RVNGBinaryData &result) const;
509
511 MWAWPictBitmapContainer<MWAWColor> m_data;
512
514 bool m_hasAlpha;
515 };
516 #endif
517 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWPictBitmapBW::setColumn
void setColumn(int i, bool const *val)
sets all cell contents of a column
Definition: MWAWPictBitmap.hxx:314
MWAWPictBitmap::BW
Definition: MWAWPictBitmap.hxx:192
MWAWPictBitmapContainer::numColumns
int numColumns() const
gets the number of column
Definition: MWAWPictBitmap.hxx:100
MWAWPictBitmapColor::set
void set(int i, int j, MWAWColor const &v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:491
MWAWPictBitmapContainer::m_data
T * m_data
the m_data placed by row ie. d_00, d_10, ... , d_{X-1}0, ..
Definition: MWAWPictBitmap.hxx:148
MWAWPictBitmap::cmp
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPictBitmap.hxx:219
MWAWPictBitmapColor::valid
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:456
MWAWPictBitmapColor::cmp
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPictBitmap.hxx:446
MWAWPictBitmap::Indexed
Definition: MWAWPictBitmap.hxx:192
MWAWPictBitmapBW::size
Vec2i const & size() const
the picture size
Definition: MWAWPictBitmap.hxx:274
libmwaw_internal.hxx
Vec2f
Vec2< float > Vec2f
Vec2 of float.
Definition: libmwaw_internal.hxx:711
MWAWPictBitmapBW::valid
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:265
MWAWPictBitmapContainer::setColumn
void setColumn(int i, U const *val)
sets a column of m_data
Definition: MWAWPictBitmap.hxx:135
MWAWPictBitmapColor::numRows
int numRows() const
the number of rows
Definition: MWAWPictBitmap.hxx:470
MWAWPictBitmapContainer::setRow
void setRow(int j, U const *val)
sets a line of m_data
Definition: MWAWPictBitmap.hxx:127
MWAWPictBitmapContainer::set
void set(int i, int j, T const &v)
sets a cell m_data
Definition: MWAWPictBitmap.hxx:119
MWAWPictBitmap::createFileData
virtual bool createFileData(librevenge::RVNGBinaryData &result) const =0
abstract function which creates the result file
MWAWPictBitmapIndexed::setColumn
void setColumn(int i, U const *val)
sets all cell contents of a column
Definition: MWAWPictBitmap.hxx:402
MWAWPictBitmap::getSubType
virtual SubType getSubType() const =0
returns the picture subtype
MWAWPictBitmap::MWAWPictBitmap
MWAWPictBitmap(Vec2i const &sz)
protected constructor: use check to construct a picture
Definition: MWAWPictBitmap.hxx:237
MWAWPictBitmapColor::setRow
void setRow(int j, MWAWColor const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:496
MWAWPictBitmap::Color
Definition: MWAWPictBitmap.hxx:192
MWAWPictBitmapContainer::m_size
Vec2i m_size
the size
Definition: MWAWPictBitmap.hxx:146
MWAWPictBitmapColor::size
Vec2i const & size() const
the picture size
Definition: MWAWPictBitmap.hxx:465
Box2f
Box2< float > Box2f
Box2 of float.
Definition: libmwaw_internal.hxx:1072
MWAWColor
the class to store a color
Definition: libmwaw_internal.hxx:167
MWAWPict::cmp
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPict.hxx:102
MWAWPictBitmapContainer::get
T const & get(int i, int j) const
accessor of a cell m_data
Definition: MWAWPictBitmap.hxx:106
MWAWPictBitmapColor
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:435
MWAWPictBitmapIndexed::getRow
int const * getRow(int j) const
returns the cells content of a row
Definition: MWAWPictBitmap.hxx:386
MWAWPictBitmapBW::numColumns
int numColumns() const
the number of columns
Definition: MWAWPictBitmap.hxx:284
MWAWPictBitmapBW::numRows
int numRows() const
the number of rows
Definition: MWAWPictBitmap.hxx:279
MWAWPictBitmapContainer
a template class to store a 2D array of m_data
Definition: MWAWPictBitmap.hxx:54
MWAWPictBitmapIndexed::valid
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:357
MWAWPictBitmapBW::setRow
void setRow(int j, bool const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:304
MWAWPictBitmapContainer::numRows
int numRows() const
gets the number of row
Definition: MWAWPictBitmap.hxx:95
MWAWPictBitmapIndexed::getColors
std::vector< MWAWColor > const & getColors() const
returns the array of indexed colors
Definition: MWAWPictBitmap.hxx:408
MWAWPict.hxx
MWAWPictBitmapBW
a bitmap of bool to store black-white bitmap
Definition: MWAWPictBitmap.hxx:244
MWAWPictBitmapBW::getRow
bool const * getRow(int j) const
returns the cells content of a row
Definition: MWAWPictBitmap.hxx:294
MWAWPictBitmapIndexed::set
void set(int i, int j, int v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:392
MWAWPictBitmap::SubType
SubType
the picture subtype: blackwhite, indexed, color
Definition: MWAWPictBitmap.hxx:192
MWAWPictBitmapContainerBool
a bool container with a function to put packed row
Definition: MWAWPictBitmap.hxx:152
MWAWPictBitmapBW::set
void set(int i, int j, bool v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:299
MWAWPictBitmapIndexed::MWAWPictBitmapIndexed
MWAWPictBitmapIndexed(Vec2i const &sz)
the constructor
Definition: MWAWPictBitmap.hxx:363
MWAWPictBitmapColor::m_hasAlpha
bool m_hasAlpha
true if the bitmap has alpha color
Definition: MWAWPictBitmap.hxx:514
MWAWPictBitmapIndexed
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:328
MWAWPictBitmapIndexed::setColors
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:413
MWAWPictBitmapColor::MWAWPictBitmapColor
MWAWPictBitmapColor(Vec2i const &sz, bool useAlphaChannel=false)
the constructor
Definition: MWAWPictBitmap.hxx:462
MWAWPictBitmapIndexed::m_data
MWAWPictBitmapContainer< int > m_data
the m_data
Definition: MWAWPictBitmap.hxx:423
MWAWPict::setBdBox
void setBdBox(Box2f const &box)
sets the bdbox of the picture
Definition: MWAWPict.hxx:85
MWAWPictBitmapBW::createFileData
virtual bool createFileData(librevenge::RVNGBinaryData &result) const
function which creates the result file
Definition: MWAWPictBitmap.cxx:227
MWAWPict::Type
Type
the different picture types:
Definition: MWAWPict.hxx:64
MWAWPictBitmapContainerBool::cmp
int cmp(MWAWPictBitmapContainerBool const &orig) const
a comparison operator
Definition: MWAWPictBitmap.hxx:159
MWAWPictBitmap::getBinary
virtual bool getBinary(librevenge::RVNGBinaryData &res, std::string &s) const
returns the final librevenge::RVNGBinary data
Definition: MWAWPictBitmap.hxx:202
Vec2::cmpY
int cmpY(Vec2< T > const &p) const
a comparison function: which first compares y then x
Definition: libmwaw_internal.hxx:655
MWAWPictBitmapContainer::operator=
MWAWPictBitmapContainer & operator=(MWAWPictBitmapContainer const &orig)
MWAWPictBitmapContainerBool::setRowPacked
void setRowPacked(int j, unsigned char const *val)
allows to use packed m_data
Definition: MWAWPictBitmap.hxx:173
MWAWPictBitmapColor::getRow
MWAWColor const * getRow(int j) const
returns the cells content of a row
Definition: MWAWPictBitmap.hxx:485
MWAWPictBitmapIndexed::setRow
void setRow(int j, U const *val)
sets all cell contents of a row
Definition: MWAWPictBitmap.hxx:397
MWAWPictBitmapContainerBool::MWAWPictBitmapContainerBool
MWAWPictBitmapContainerBool(Vec2i const &sz)
constructor
Definition: MWAWPictBitmap.hxx:156
MWAWPictBitmapContainer::~MWAWPictBitmapContainer
virtual ~MWAWPictBitmapContainer()
destructor
Definition: MWAWPictBitmap.hxx:65
MWAWPictBitmapIndexed::createFileData
virtual bool createFileData(librevenge::RVNGBinaryData &result) const
the function which creates the result file
Definition: MWAWPictBitmap.cxx:246
MWAWPictBitmap
Generic class used to construct bitmap.
Definition: MWAWPictBitmap.hxx:188
MWAWPictBitmapColor::numColumns
int numColumns() const
the number of columns
Definition: MWAWPictBitmap.hxx:475
MWAWPictBitmapContainer::cmp
int cmp(MWAWPictBitmapContainer< T > const &orig) const
a comparison operator
Definition: MWAWPictBitmap.hxx:77
MWAWPictBitmapContainer::ok
bool ok() const
returns ok, if the m_data is allocated
Definition: MWAWPictBitmap.hxx:71
MWAWPictBitmapIndexed::numRows
int numRows() const
the number of rows
Definition: MWAWPictBitmap.hxx:371
MWAWPictBitmapContainer::getRow
T const * getRow(int j) const
accessor of a row m_data
Definition: MWAWPictBitmap.hxx:112
MWAWPictBitmapColor::setColumn
void setColumn(int i, MWAWColor const *val)
sets all cell contents of a column
Definition: MWAWPictBitmap.hxx:501
MWAWPictBitmap::valid
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:212
MWAWPictBitmapBW::cmp
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPictBitmap.hxx:255
MWAWPictBitmapBW::getSubType
virtual SubType getSubType() const
returns the picture subtype
Definition: MWAWPictBitmap.hxx:248
MWAWPictBitmapContainer::MWAWPictBitmapContainer
MWAWPictBitmapContainer(Vec2i const &sz)
constructor given size
Definition: MWAWPictBitmap.hxx:58
Vec2< int >
MWAWPict::Bitmap
Definition: MWAWPict.hxx:64
MWAWPictBitmapColor::createFileData
virtual bool createFileData(librevenge::RVNGBinaryData &result) const
the function which creates the result file
Definition: MWAWPictBitmap.cxx:236
MWAWPictBitmapIndexed::m_colors
std::vector< MWAWColor > m_colors
the colors
Definition: MWAWPictBitmap.hxx:425
MWAWPictBitmapIndexed::getSubType
virtual SubType getSubType() const
return the picture subtype
Definition: MWAWPictBitmap.hxx:332
MWAWPictBitmap::getType
virtual Type getType() const
returns the picture type
Definition: MWAWPictBitmap.hxx:194
MWAWPictBitmapColor::getSubType
virtual SubType getSubType() const
return the picture subtype
Definition: MWAWPictBitmap.hxx:439
MWAWPictBitmapBW::setRowPacked
void setRowPacked(int j, unsigned char const *val)
sets all cell contents of a row given packed m_data
Definition: MWAWPictBitmap.hxx:309
MWAWPictBitmapIndexed::numColumns
int numColumns() const
the number of columns
Definition: MWAWPictBitmap.hxx:376
MWAWPictBitmapColor::m_data
MWAWPictBitmapContainer< MWAWColor > m_data
the data
Definition: MWAWPictBitmap.hxx:511
MWAWPictBitmapContainer::size
Vec2i const & size() const
return the array size
Definition: MWAWPictBitmap.hxx:90
MWAWPictBitmapBW::MWAWPictBitmapBW
MWAWPictBitmapBW(Vec2i const &sz)
the constructor
Definition: MWAWPictBitmap.hxx:271
MWAWPict
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:52
MWAWPictBitmapIndexed::size
Vec2i const & size() const
the picture size
Definition: MWAWPictBitmap.hxx:366
MWAWPictBitmapBW::m_data
MWAWPictBitmapContainerBool m_data
the data
Definition: MWAWPictBitmap.hxx:324
MWAWPictBitmapIndexed::cmp
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPictBitmap.hxx:339