37 #ifndef MWAW_PICT_BITMAP
38 # define MWAW_PICT_BITMAP
62 std::uninitialized_fill_n(
m_data, m_size[0] * m_size[1], T());
80 if (diff)
return diff;
82 if (!orig.
m_data)
return -1;
106 T
const &
get(
int i,
int j)
const
121 void set(
int i,
int j, T
const &v)
124 MWAW_DEBUG_MSG((
"MWAWPictBitmapContainer::set: call with bad coordinate %d %d\n", i, j));
135 MWAW_DEBUG_MSG((
"MWAWPictBitmapContainer::setRow: call with bad coordinate %d\n", j));
146 MWAW_DEBUG_MSG((
"MWAWPictBitmapContainer::setColumn: call with bad coordinate %d\n", i));
149 for (
int j = 0, ind=i; j <
m_size[1]; j++, ind+=m_size[0])
m_data[ind] = T(val[i]);
173 if (diff)
return diff;
175 if (!orig.
m_data)
return -1;
178 return m_data[i] ? 1 : -1;
187 MWAW_DEBUG_MSG((
"MWAWPictBitmapContainerBool::setRowPacked: call with bad coordinate %d\n", j));
191 unsigned char v = *(val++);
192 unsigned char mask = 0x80;
193 for (
int p = 0; p < 8 && i < m_size[0]; i++, p++, ind++) {
194 m_data[ind] = ((v&mask) != 0);
195 mask = (
unsigned char)(mask >> 1);
218 if (!
valid())
return false;
220 librevenge::RVNGBinaryData data;
237 if (diff)
return diff;
242 if (diff)
return (diff < 0) ? -1 : 1;
249 virtual bool createFileData(librevenge::RVNGBinaryData &result)
const = 0;
273 if (diff)
return diff;
304 bool get(
int i,
int j)
const
314 void set(
int i,
int j,
bool v)
336 virtual bool createFileData(librevenge::RVNGBinaryData &result)
const;
357 if (diff)
return diff;
361 if (diff)
return (diff < 0) ? -1 : 1;
362 for (
size_t c=0; c <
m_colors.size(); c++) {
396 int get(
int i,
int j)
const
407 void set(
int i,
int j,
int v)
412 template <
class U>
void setRow(
int j, U
const *val)
435 virtual bool createFileData(librevenge::RVNGBinaryData &result)
const;
464 if (diff)
return diff;
523 virtual bool createFileData(librevenge::RVNGBinaryData &result)
const;