MWAWPictBitmapBW Class Referencefinal

a bitmap of bool to store black-white bitmap More...

#include <MWAWPictBitmap.hxx>

Inheritance diagram for MWAWPictBitmapBW:
MWAWPictBitmap MWAWPict

Public Member Functions

SubType getSubType () const final
 returns the picture subtype
 
int cmp (MWAWPict const &a) const final
 a virtual function used to obtain a strict order, must be redefined in the subs class
 
bool valid () const final
 returns true if the picture is valid
 
 MWAWPictBitmapBW (MWAWVec2i const &sz)
 the constructor
 
MWAWVec2i const & size () const
 the picture size
 
int numRows () const
 the number of rows
 
int numColumns () const
 the number of columns
 
bool get (int i, int j) const
 returns a cell content
 
bool const * getRow (int j) const
 returns the cells content of a row
 
void set (int i, int j, bool v)
 sets a cell contents
 
void setRow (int j, bool const *val)
 sets all cell contents of a row
 
void setRowPacked (int j, unsigned char const *val, unsigned char const *end)
 sets all cell contents of a row given packed m_data
 
void setColumn (int i, bool const *val)
 sets all cell contents of a column
 
MWAWColor getAverageColor () const final
 returns the average color
 
- Public Member Functions inherited from MWAWPictBitmap
 ~MWAWPictBitmap () override
 destructor
 
Type getType () const override
 returns the picture type
 
virtual SubType getSubType () const =0
 returns the picture subtype
 
bool getBinary (MWAWEmbeddedObject &picture) const override
 returns the final picture
 
virtual bool valid () const
 returns true if the picture is valid
 
virtual MWAWColor getAverageColor () const =0
 returns the average color
 
int cmp (MWAWPict const &a) const override
 a virtual function used to obtain a strict order, must be redefined in the subs class
 
- Public Member Functions inherited from MWAWPict
virtual ~MWAWPict ()
 virtual destructor
 
virtual Type getType () const =0
 returns the picture type
 
MWAWBox2f getBdBox () const
 returns the bdbox of the picture
 
void setBdBox (MWAWBox2f const &box)
 sets the bdbox of the picture
 
virtual bool getBinary (MWAWEmbeddedObject &) const
 tries to convert the picture in a binary data :
 
virtual int cmp (MWAWPict const &a) const
 a virtual function used to obtain a strict order, must be redefined in the subs class
 

Protected Member Functions

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

Protected Attributes

MWAWPictBitmapContainerBool m_data
 the data
 

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
 

Detailed Description

a bitmap of bool to store black-white bitmap

Constructor & Destructor Documentation

◆ MWAWPictBitmapBW()

MWAWPictBitmapBW::MWAWPictBitmapBW ( MWAWVec2i const &  sz)
inlineexplicit

the constructor

Member Function Documentation

◆ cmp()

int MWAWPictBitmapBW::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 MWAWPictBitmapBW::createFileData ( librevenge::RVNGBinaryData &  result) const
finalprotectedvirtual

function which creates the result file

Implements MWAWPictBitmap.

◆ get()

bool MWAWPictBitmapBW::get ( int  i,
int  j 
) const
inline

returns a cell content

◆ getAverageColor()

MWAWColor MWAWPictBitmapBW::getAverageColor ( ) const
finalvirtual

returns the average color

Implements MWAWPictBitmap.

◆ getRow()

bool const * MWAWPictBitmapBW::getRow ( int  j) const
inline

returns the cells content of a row

Referenced by getAverageColor().

◆ getSubType()

SubType MWAWPictBitmapBW::getSubType ( ) const
inlinefinalvirtual

returns the picture subtype

Implements MWAWPictBitmap.

◆ numColumns()

int MWAWPictBitmapBW::numColumns ( ) const
inline

the number of columns

◆ numRows()

int MWAWPictBitmapBW::numRows ( ) const
inline

the number of rows

◆ set()

void MWAWPictBitmapBW::set ( int  i,
int  j,
bool  v 
)
inline

sets a cell contents

◆ setColumn()

void MWAWPictBitmapBW::setColumn ( int  i,
bool const *  val 
)
inline

sets all cell contents of a column

◆ setRow()

void MWAWPictBitmapBW::setRow ( int  j,
bool const *  val 
)
inline

sets all cell contents of a row

◆ setRowPacked()

void MWAWPictBitmapBW::setRowPacked ( int  j,
unsigned char const *  val,
unsigned char const *  end 
)
inline

sets all cell contents of a row given packed m_data

Referenced by ApplePictParserInternal::Bitmap::get(), libmwaw_applepict1::Bitmap::saveBitmap(), and RagTimeParser::sendBitmap().

◆ size()

MWAWVec2i const & MWAWPictBitmapBW::size ( ) const
inline

the picture size

◆ valid()

bool MWAWPictBitmapBW::valid ( ) const
inlinefinalvirtual

returns true if the picture is valid

Reimplemented from MWAWPictBitmap.

Referenced by ApplePictParserInternal::Bitmap::get(), and libmwaw_applepict1::Bitmap::saveBitmap().

Member Data Documentation

◆ m_data


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

Generated on Thu Jan 19 2023 00:00:00 for libmwaw by doxygen 1.9.6