Go to the documentation of this file.
39 # define MWAW_PICT_MAC
44 # include <librevenge/librevenge.h>
64 librevenge::RVNGBinaryData res;
66 librevenge::RVNGBinaryData dataV2;
90 if (diff)
return diff;
94 if (diff)
return (diff < 0) ? -1 : 1;
96 if (diff)
return (diff < 0) ? -1 : 1;
102 static bool convertPict1To2(librevenge::RVNGBinaryData
const &orig, librevenge::RVNGBinaryData &result);
internal and low level: map opcode id -> OpCode
Definition: MWAWPictMac.cxx:1033
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data
Definition: MWAWPict.hxx:73
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
shared_ptr< Region > m_region
the region
Definition: MWAWPictMac.cxx:406
@ WP_POINT
Definition: MWAWPictMac.cxx:138
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
void set(MWAWVec2< T > const &x, MWAWVec2< T > const &y)
resets the data to minimum x and maximum y
Definition: libmwaw_internal.hxx:1020
virtual ~Value()
Definition: MWAWPictMac.cxx:516
friend std::ostream & operator<<(std::ostream &o, Bitmap const &f)
operator<< for Bitmap
Definition: MWAWPictMac.cxx:278
@ WP_BITMAP
Definition: MWAWPictMac.cxx:139
MWAWColor m_rgb
the color when type=WP_COLOR
Definition: MWAWPictMac.cxx:499
Internal and low level: a class used to read and store all possible value.
Definition: MWAWPictMac.cxx:414
MWAWBox2i m_dst
another final dimension
Definition: MWAWPictMac.cxx:404
@ WP_PATTERN
Definition: MWAWPictMac.cxx:138
bool isEmpty() const
returns true if the picture is valid and has size 0 or contains no data
Definition: MWAWPictData.hxx:91
MWAWBox2i m_box
the bounding box
Definition: MWAWPictMac.cxx:219
virtual bool getBinary(MWAWEmbeddedObject &picture) const
returns the final picture
Definition: MWAWPictBitmap.hxx:220
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:284
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:465
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:231
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
@ WP_RECT
Definition: MWAWPictMac.cxx:138
@ MWAW_R_OK
Definition: MWAWPict.hxx:73
PictParser()
the constructor
Definition: MWAWPictMac.cxx:1036
OpCode(int id, char const *nm, DataType type1=WP_NONE, DataType type2=WP_NONE, DataType type3=WP_NONE, DataType type4=WP_NONE, DataType type5=WP_NONE)
constructor
Definition: MWAWPictMac.cxx:532
@ WP_PBITMAP
Definition: MWAWPictMac.cxx:139
bool readBitmapData(MWAWInputStream &input, bool packed)
parses the bitmap data zone
Definition: MWAWPictMac.cxx:356
void setRowPacked(int j, unsigned char const *val)
sets all cell contents of a row given packed m_data
Definition: MWAWPictBitmap.hxx:328
SubType
the picture subtype
Definition: MWAWPictData.hxx:56
int m_id
the opCode
Definition: MWAWPictMac.cxx:629
int m_int
the int value when type=WP_INT
Definition: MWAWPictMac.cxx:497
@ WP_POINTUBYTE
Definition: MWAWPictMac.cxx:138
@ WP_UBYTE
Definition: MWAWPictMac.cxx:137
Internal and low level: a class to define each opcode and their arguments and read their data.
Definition: MWAWPictMac.cxx:521
shared_ptr< Bitmap > m_bitmap
the bitmap when type=WP_BITMAP
Definition: MWAWPictMac.cxx:513
@ PictMac
Definition: MWAWPictData.hxx:56
std::vector< DataType > m_types
the different argument types
Definition: MWAWPictMac.cxx:633
@ WP_UFIXED
Definition: MWAWPictMac.cxx:137
static bool readRect(MWAWInputStream &input, DataType type, MWAWBox2i &res)
read a rectangles field
Definition: MWAWPictMac.cxx:588
DataType
Internal and low level: the different types of arguments.
Definition: MWAWPictMac.cxx:136
@ WP_POLY
Definition: MWAWPictMac.cxx:138
MWAWBox2i m_box
the rectangle when type=WP_RECT
Definition: MWAWPictMac.cxx:507
@ WP_INT
Definition: MWAWPictMac.cxx:137
int m_rowBytes
the num of bytes used to store a row
Definition: MWAWPictMac.cxx:403
int m_mode
the encoding mode ?
Definition: MWAWPictMac.cxx:410
a bitmap of bool to store black-white bitmap
Definition: MWAWPictBitmap.hxx:264
int m_subVersion
the picture subversion
Definition: MWAWPictMac.hxx:124
T y() const
second element
Definition: libmwaw_internal.hxx:620
Internal and low level: class used to read/store a picture region.
Definition: MWAWPictMac.cxx:147
bool dumpFile(librevenge::RVNGBinaryData &data, char const *fileName)
a debug function to store in a datafile in the current directory WARNING: this function erase the fil...
Definition: MWAWDebug.cxx:197
#define ADD_DATA_SHORT(resPtr, val)
T x() const
first element
Definition: libmwaw_internal.hxx:615
std::string m_text
the text when type=WP_TEXT
Definition: MWAWPictMac.cxx:503
void extendBDBox(float val)
udaptes the bdbox, by extended it by (val-previousVal)
Definition: MWAWPict.hxx:137
bool read(MWAWInputStream &input, bool packed, bool hasRegion)
tries to read a bitmap
Definition: MWAWPictMac.cxx:229
@ WP_RPBITMAP
Definition: MWAWPictMac.cxx:139
shared_ptr< Region > m_region
the region when type=WP_REGION
Definition: MWAWPictMac.cxx:511
bool computeSize(MWAWInputStream &input, int &sz) const
computes the size of the data
Definition: MWAWPictMac.cxx:569
static bool createFileData(librevenge::RVNGBinaryData const &orig, librevenge::RVNGBinaryData &result)
a file pict can be created from the data pict by adding a header with size 512, this function do this...
Definition: MWAWPictData.cxx:49
std::vector< MWAWVec2i > m_listPoint
the list of points which defined the polygon when type=WP_POLY
Definition: MWAWPictMac.cxx:509
int m_version
the picture version
Definition: MWAWPictMac.hxx:122
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class
Definition: MWAWPictData.hxx:122
bool saveBitmap() const
saves the bitmap in file (debugging function)
Definition: MWAWPictMac.cxx:309
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:52
@ MWAW_R_BAD
Definition: MWAWPict.hxx:73
static bool readText(MWAWInputStream &input, DataType type, std::string &res)
low level: reads a string argument
Definition: MWAWPictMac.cxx:973
static bool readInt(MWAWInputStream &input, DataType type, int &res)
low level: reads a integer ( bytes or 2 bytes, signed or unsigned)
Definition: MWAWPictMac.cxx:748
static bool readPattern(MWAWInputStream &input, DataType type, int(&pat)[8])
low level: reads a pattern argument
Definition: MWAWPictMac.cxx:847
Value()
Definition: MWAWPictMac.cxx:415
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
@ WP_UNKNOWN
Definition: MWAWPictMac.cxx:139
static bool readValue(MWAWInputStream &input, DataType type, Value &val)
reads a argument of type type, if successfull updates val.
Definition: MWAWPictMac.cxx:686
bool read(MWAWInputStream &input)
tries to read the data
Definition: MWAWPictMac.cxx:164
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class
Definition: MWAWPictMac.hxx:87
@ WP_UINT
Definition: MWAWPictMac.cxx:137
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
bool unpackedData(unsigned char const *pData, int sz)
creates the bitmap from the packdata
Definition: MWAWPictMac.cxx:329
friend std::ostream & operator<<(std::ostream &o, Value const &f)
operator<< for Value
Definition: MWAWPictMac.cxx:428
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictMac.hxx:80
virtual ~OpCode()
Definition: MWAWPictMac.cxx:1027
std::vector< MWAWVec2i > m_points
the set of points which defines the mask
Definition: MWAWPictMac.cxx:221
librevenge::RVNGBinaryData m_data
the data size (without the empty header of 512 characters)
Definition: MWAWPictData.hxx:168
MWAWBox2i m_src
the initial dimension
Definition: MWAWPictMac.cxx:404
MWAWBox2i m_rect
the bitmap rectangle
Definition: MWAWPictMac.cxx:404
bool readData(MWAWInputStream &input, std::vector< Value > &listValue) const
tries to read the data in the file
Definition: MWAWPictMac.cxx:551
@ MWAW_R_OK_EMPTY
Definition: MWAWPict.hxx:73
an abstract class which defines basic formated picture ( AppleŠ Pict, DB3, ...)
Definition: MWAWPictData.hxx:53
Internal and low level: a class used to read pack/unpack black-white bitmap.
Definition: MWAWPictMac.cxx:225
std::string m_name
the opCode name
Definition: MWAWPictMac.cxx:631
DataType m_type
the stored type of the data
Definition: MWAWPictMac.cxx:425
@ WP_LTEXT
Definition: MWAWPictMac.cxx:138
bool convertToPict2(librevenge::RVNGBinaryData const &orig, librevenge::RVNGBinaryData &result)
internal and low level: tries to convert a Pict1.0 picture stored in orig in a Pict2....
Definition: MWAWPictMac.cxx:1121
@ WP_RBITMAP
Definition: MWAWPictMac.cxx:139
@ WP_TEXT
Definition: MWAWPictMac.cxx:138
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
Bitmap()
Definition: MWAWPictMac.cxx:226
Internal and low level: generic tools about Mac Pict1.0 picture.
Definition: MWAWPictMac.cxx:128
static bool readColor(MWAWInputStream &input, DataType type, MWAWColor &col)
low level: reads a color argument
Definition: MWAWPictMac.cxx:800
void set(T xx, T yy)
resets the two elements
Definition: libmwaw_internal.hxx:638
virtual bool getBinary(MWAWEmbeddedObject &picture) const
returns the final picture
Definition: MWAWPictMac.hxx:61
@ WP_REGION
Definition: MWAWPictMac.cxx:138
int m_pat[8]
the pattern when type=WP_PATTERN
Definition: MWAWPictMac.cxx:501
Region()
Definition: MWAWPictMac.cxx:149
static int getSize(MWAWInputStream &input, DataType type)
returns the size of the next argument of type type.
Definition: MWAWPictMac.cxx:639
static bool readPoly(MWAWInputStream &input, DataType type, MWAWBox2i &box, std::vector< MWAWVec2i > &res)
low level: reads a polygon argument
Definition: MWAWPictMac.cxx:911
std::vector< unsigned char > m_bitmap
the bitmap
Definition: MWAWPictMac.cxx:408
@ WP_NONE
Definition: MWAWPictMac.cxx:137
friend std::ostream & operator<<(std::ostream &o, Region const &f)
operator << for a Region
Definition: MWAWPictMac.cxx:151
static bool convertPict1To2(librevenge::RVNGBinaryData const &orig, librevenge::RVNGBinaryData &result)
convert a Pict1.0 in Pict2.0, if possible
Definition: MWAWPictMac.cxx:1236
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
virtual ~MWAWPictMac()
destructor
Definition: MWAWPictMac.cxx:54
static bool readPoint(MWAWInputStream &input, DataType type, MWAWVec2i &res)
low level: reads a point argument
Definition: MWAWPictMac.cxx:865
MWAWVec2i m_point
the point when type=WP_POINT
Definition: MWAWPictMac.cxx:505
@ WP_POINTBYTE
Definition: MWAWPictMac.cxx:138
std::map< int, OpCode > m_mapIdOp
the map
Definition: MWAWPictMac.cxx:1116
MWAWPictMac(MWAWBox2f box)
protected constructor: use check to construct a picture
Definition: MWAWPictMac.hxx:106
virtual SubType getSubType() const
returns the picture subtype
Definition: MWAWPictMac.hxx:56
static ReadResult checkOrGet(MWAWInputStreamPtr input, int size, MWAWBox2f &box, MWAWPictData **result=0L)
checks if the data pointed by input and of given size is a pict 1.0, 2.0 or 2.1
Definition: MWAWPictMac.cxx:59
@ WP_BYTE
Definition: MWAWPictMac.cxx:137
Class to read/store a Mac Pict1.0/2.0.
Definition: MWAWPictMac.hxx:51
@ WP_COLOR
Definition: MWAWPictMac.cxx:138
Generated on Wed Jun 17 2020 06:30:12 for libmwaw by
doxygen 1.8.18