MWAWPictBitmapColor Class Reference documentation

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MWAWPictBitmapColor Class Referencefinal

a bitmap of MWAWColor to store true color bitmap More...

`#include <MWAWPictBitmap.hxx>`

Inheritance diagram for MWAWPictBitmapColor:

## Public Member Functions
SubType | getSubType () const final
| return the picture subtype More...
int | cmp (MWAWPict const &a) const final
| a virtual function used to obtain a strict order, must be redefined in the subs class More...
bool | valid () const final
| returns true if the picture is valid More...
| MWAWPictBitmapColor (MWAWVec2i const &sz, bool useAlphaChannel=false)
| the constructor More...
MWAWVec2i const & | size () const
| the picture size More...
int | numRows () const
| the number of rows More...
int | numColumns () const
| the number of columns More...
MWAWColor | get (int i, int j) const
| returns a cell content More...
MWAWColor const * | getRow (int j) const
| returns the cells content of a row More...
void | set (int i, int j, MWAWColor const &v)
| sets a cell contents More...
void | setRow (int j, MWAWColor const *val)
| sets all cell contents of a row More...
void | setColumn (int i, MWAWColor const *val)
| sets all cell contents of a column More...
Public Member Functions inherited from MWAWPictBitmap
| ~MWAWPictBitmap () override
| destructor More...
Type | getType () const override
| returns the picture type More...
bool | getBinary (MWAWEmbeddedObject &picture) const override
| returns the final picture More...
Public Member Functions inherited from MWAWPict
virtual | ~MWAWPict ()
| virtual destructor More...
MWAWBox2f | getBdBox () const
| returns the bdbox of the picture More...
void | setBdBox (MWAWBox2f const &box)
| sets the bdbox of the picture More...

## Protected Member Functions
bool | createFileData (librevenge::RVNGBinaryData &result) const final
| the function which creates the result file More...
Protected Member Functions inherited from MWAWPictBitmap
| MWAWPictBitmap (MWAWVec2i const &sz)
| protected constructor: use check to construct a picture More...
Protected Member Functions inherited from MWAWPict
void | extendBDBox (float val)
| udaptes the bdbox, by extended it by (val-previousVal) More...
| MWAWPict ()
| protected constructor must not be called directly More...
| MWAWPict (MWAWPict const &p)
| protected constructor must not be called directly More...
MWAWPict & | operator= (MWAWPict const &p)
| protected operator= must not be called directly More...

## Protected Attributes
MWAWPictBitmapContainer< MWAWColor > | m_data
| the data More...
bool | m_hasAlpha
| true if the bitmap has alpha color More...

## Additional Inherited Members
Public Types inherited from MWAWPictBitmap
enum | SubType { BW, Indexed, Color }
| the picture subtype: blackwhite, indexed, color More...
Public Types inherited from MWAWPict
enum | Type { PictData, Bitmap, Unknown }
| the different picture types: More...
enum | ReadResult { MWAW_R_BAD =0, MWAW_R_OK, MWAW_R_OK_EMPTY, MWAW_R_MAYBE }
| an enum to defined the result of a parsing use by some picture's classes which can read their data More...
Static Protected Member Functions inherited from MWAWPict
static MWAWBox2f | getBdBox (int numPt, MWAWVec2f const *pt)
| computes the minimum and maximum of a list of point More...

## Detailed Description

a bitmap of MWAWColor to store true color bitmap

Note
  : this class is actually the only class which can create bitmap with transparency (by creating a BMP), but as LibreOffice/OpenOffice seem to ignore the alpha channel when importing BMP pictures...

## Constructor & Destructor Documentation

## ◆ MWAWPictBitmapColor()

MWAWPictBitmapColor::MWAWPictBitmapColor | ( | MWAWVec2i const & | sz,
|  | bool | useAlphaChannel = `false`
| ) |  |
| inline

the constructor

## Member Function Documentation

## ◆ cmp()

int MWAWPictBitmapColor::cmp | ( | MWAWPict const & | a | ) | const
| inlinefinalvirtual

a virtual function used to obtain a strict order, must be redefined in the subs class

Reimplemented from MWAWPictBitmap.

## ◆ createFileData()

bool MWAWPictBitmapColor::createFileData | ( | librevenge::RVNGBinaryData & | result | ) | const
| finalprotectedvirtual

the function which creates the result file

Implements MWAWPictBitmap.

## ◆ get()

MWAWColor MWAWPictBitmapColor::get | ( | int | i,
|  | int | j
| ) |  | const
| inline

returns a cell content

## ◆ getRow()

MWAWColor const* MWAWPictBitmapColor::getRow | ( | int | j | ) | const
| inline

returns the cells content of a row

## ◆ getSubType()

SubType MWAWPictBitmapColor::getSubType | ( |  | ) | const
| inlinefinalvirtual

return the picture subtype

Implements MWAWPictBitmap.

## ◆ numColumns()

int MWAWPictBitmapColor::numColumns | ( |  | ) | const
| inline

the number of columns

## ◆ numRows()

int MWAWPictBitmapColor::numRows | ( |  | ) | const
| inline

the number of rows

## ◆ set()

void MWAWPictBitmapColor::set | ( | int | i,
|  | int | j,
|  | MWAWColor const & | v
| ) |  |
| inline

sets a cell contents

Referenced by MacDraftParser::sendBitmap(), ClarisDrawGraph::sendBitmap(), and ClarisWksGraph::sendBitmap().

## ◆ setColumn()

void MWAWPictBitmapColor::setColumn | ( | int | i,
|  | MWAWColor const * | val
| ) |  |
| inline

sets all cell contents of a column

## ◆ setRow()

void MWAWPictBitmapColor::setRow | ( | int | j,
|  | MWAWColor const * | val
| ) |  |
| inline

sets all cell contents of a row

Referenced by MacDrawParser::sendBitmap(), and MacDraftParser::sendBitmap().

## ◆ size()

MWAWVec2i const& MWAWPictBitmapColor::size | ( |  | ) | const
| inline

the picture size

## ◆ valid()

bool MWAWPictBitmapColor::valid | ( |  | ) | const
| inlinefinalvirtual

returns true if the picture is valid

Reimplemented from MWAWPictBitmap.

## Member Data Documentation

## ◆ m_data

MWAWPictBitmapContainer<MWAWColor> MWAWPictBitmapColor::m_data
| protected

the data

## ◆ m_hasAlpha

bool MWAWPictBitmapColor::m_hasAlpha
| protected

true if the bitmap has alpha color

The documentation for this class was generated from the following files:

- MWAWPictBitmap.hxx
- MWAWPictBitmap.cxx