Go to the documentation of this file.
34 #ifndef MACDRAFT5_STYLE_MANAGER
35 # define MACDRAFT5_STYLE_MANAGER
40 #include <librevenge/librevenge.h>
130 shared_ptr<MacDraft5StyleManagerInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
int m_majorVersion
the major number
Definition: MWAWRSRCParser.hxx:140
bool getColor(int id, MWAWColor &col)
returns a color if possible
Definition: MacDraft5StyleManager.cxx:325
a public structure used to return the version
Definition: MWAWRSRCParser.hxx:133
std::string m_string
the major string
Definition: MWAWRSRCParser.hxx:144
bool readResource(MWAWEntry &entry, bool inRsrc)
try to read a resource
Definition: MacDraft5StyleManager.cxx:946
friend std::ostream & operator<<(std::ostream &o, Pixmap const &f)
operator<< for Pixmap
Definition: MacDraft5StyleManager.cxx:76
MacDraft5StyleManager(MacDraft5Parser &parser)
constructor
Definition: MacDraft5StyleManager.cxx:566
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:432
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:282
int m_version
the pixmap version
Definition: MacDraft5StyleManager.cxx:285
virtual bool getBinary(MWAWEmbeddedObject &picture) const
returns the final picture
Definition: MWAWPictBitmap.hxx:220
bool readPixmapData(MWAWInputStream &input)
parses the pixmap data zone
Definition: MacDraft5StyleManager.cxx:84
void set(int i, int j, int v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:411
bool readPatterns(MWAWEntry const &entry, bool inRsrc)
try to read a list of patterns/gradient? : PLDT 128
Definition: MacDraft5StyleManager.cxx:1209
bool readPICTList(MWAWEntry const &entry, bool inRsrc)
try to read the PICT unknown entry: pnot:0
Definition: MacDraft5Parser.cxx:2510
Pixmap()
Definition: MacDraft5StyleManager.cxx:68
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:387
virtual ~MacDraft5StyleManager()
destructor
Definition: MacDraft5StyleManager.cxx:571
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
bool getPattern(int id, MWAWGraphicStyle::Pattern &pat)
returns a pattern if possible
Definition: MacDraft5StyleManager.cxx:337
int id() const
returns the id
Definition: MWAWEntry.hxx:153
bool get(MWAWEmbeddedObject &picture, MWAWVec2i &pictSize, MWAWColor &avColor) const
returns the pixmap
Definition: MacDraft5StyleManager.cxx:200
the class to store a color
Definition: libmwaw_internal.hxx:182
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:126
int m_pixelType
format of pixel image
Definition: MacDraft5StyleManager.cxx:289
State()
constructor
Definition: MacDraft5StyleManager.cxx:309
bool getAverageColor(MWAWColor &col) const
return the average color
Definition: MWAWGraphicStyle.cxx:101
std::vector< MWAWGraphicStyle::Arrow > m_arrowList
the arrow list
Definition: MacDraft5StyleManager.cxx:372
int m_resolution[2]
horizontal/vertical definition
Definition: MacDraft5StyleManager.cxx:288
bool readRSRCList(MWAWEntry const &entry, bool inRsrc)
try to read a resource list: PATL:128 or Opac:128+xxx
Definition: MacDraft5StyleManager.cxx:1622
bool readFonts(MWAWEntry const &entry, bool inRsrc)
try to read FNUS:1 resource
Definition: MacDraft5StyleManager.cxx:1056
bool readColors(MWAWEntry const &entry, bool inRsrc)
try to read a list of colors : pltt 128
Definition: MacDraft5StyleManager.cxx:1106
shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:509
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:115
MWAWParserStatePtr m_parserState
the parser state
Definition: MacDraft5StyleManager.hxx:128
class to read/store MacDraft5 v4-v5 styles
Definition: MacDraft5StyleManager.hxx:58
void addNote(char const *note)
adds a note in the file, in actual position
Definition: MWAWDebug.cxx:59
bool readBitmapList(MWAWEntry const &entry, bool inRsrc)
try to read BITList:0 resource
Definition: MacDraft5StyleManager.cxx:1533
std::vector< int > m_indices
the pixmap indices
Definition: MacDraft5StyleManager.cxx:298
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
std::vector< unsigned char > m_data
the pattern data: a sequence of data: p[0..7,0],p[8..15,0]...p[0..7,1],p[8..15,1],...
Definition: MWAWGraphicStyle.hxx:247
void set(int i, int j, MWAWColor const &v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:510
int m_pixelSize
physical bit by image
Definition: MacDraft5StyleManager.cxx:290
Internal: the state of a MacDraft5StyleManager.
Definition: MacDraft5StyleManager.cxx:307
bool readLayoutDefinitions(MWAWEntry const &entry, bool inRsrc)
try to read a LAYI:0 resource
Definition: MacDraft5Parser.cxx:2550
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:381
void initArrows()
init the arrow list
Definition: MacDraft5StyleManager.cxx:389
int m_minorVersion
the minor number
Definition: MWAWRSRCParser.hxx:142
std::vector< MWAWColor > m_colorTable
the color table
Definition: MacDraft5StyleManager.cxx:296
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:171
std::string updateLineStyle(int type, int id, int dashId, MWAWGraphicStyle &style)
update the line style ( using line type and col/pat id and the dashId).
Definition: MacDraft5StyleManager.cxx:608
std::vector< MWAWColor > m_colors
the colors
Definition: MacDraft5StyleManager.cxx:300
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:121
std::string m_versionString
the version string
Definition: MWAWRSRCParser.hxx:146
long m_packSize
size of data in the packed state
Definition: MacDraft5StyleManager.cxx:287
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:105
int m_rowBytes
the num of bytes used to store a row
Definition: MacDraft5StyleManager.cxx:283
void initDashs()
init the dashs list
Definition: MacDraft5StyleManager.cxx:484
T y() const
second element
Definition: libmwaw_internal.hxx:620
long getEndDataPosition() const
returns the end of data position (before the bitmap zones) if known or -1
Definition: MacDraft5StyleManager.cxx:575
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
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:375
T x() const
first element
Definition: libmwaw_internal.hxx:615
void initColors()
init the color list
Definition: MacDraft5StyleManager.cxx:424
unsigned char getBlue() const
returns the green value
Definition: libmwaw_internal.hxx:250
std::string updateSurfaceStyle(int type, int id, MWAWGraphicStyle &style)
update the surface graphic style ( using surface type and id ).
Definition: MacDraft5StyleManager.cxx:664
bool readViews(MWAWEntry const &entry, bool inRsrc)
try to read a list of views : VIEW:1
Definition: MacDraft5Parser.cxx:2434
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:56
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:265
long m_dataEnd
the end of the main data zone
Definition: MacDraft5StyleManager.cxx:368
int m_compCount
logical components per pixels
Definition: MacDraft5StyleManager.cxx:291
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:242
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:82
long m_planeBytes
offset to the next plane
Definition: MacDraft5StyleManager.cxx:293
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:475
bool readBitmapZones()
try to read the bitmap zones: end file(v4) or the zone before the rsrc part (v5)
Definition: MacDraft5StyleManager.cxx:791
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:72
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:61
bool getPixmap(int pId, MWAWEmbeddedObject &picture, MWAWVec2i &pictSize, MWAWColor &avColor) const
try to get a pixpat pattern
Definition: MacDraft5StyleManager.cxx:735
bool getColor(int cId, MWAWColor &color) const
tries to return the color corresponding to an id
Definition: MacDraft5StyleManager.cxx:580
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:430
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:293
std::vector< std::vector< float > > m_dashList
the list of dash
Definition: MacDraft5StyleManager.cxx:378
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:226
the main class to read a MacDraft5 v4-v5 file
Definition: MacDraft5Parser.hxx:62
shared_ptr< MacDraft5StyleManagerInternal::State > m_state
the state
Definition: MacDraft5StyleManager.hxx:130
bool readBitmap(MWAWEntry const &entry)
try to a bitmap
Definition: MacDraft5StyleManager.cxx:1281
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:158
Internal: the structures of a MacDraft5StyleManager.
Definition: MacDraft5StyleManager.cxx:61
std::map< int, shared_ptr< Pixmap > > m_bitmapIdToPixmapMap
a map bitmapId to pixmap map
Definition: MacDraft5StyleManager.cxx:382
bool getArrow(int id, MWAWGraphicStyle::Arrow &arrow)
returns an arrow if possible
Definition: MacDraft5StyleManager.cxx:314
MacDraft5Parser & m_parser
the main parser
Definition: MacDraft5StyleManager.hxx:126
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:245
float m_width
the arrow width in point
Definition: MWAWGraphicStyle.hxx:128
bool readPixPat(MWAWEntry const &entry, bool inRsrc)
try to read a ppat resource
Definition: MacDraft5StyleManager.cxx:1359
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
std::map< int, size_t > m_pixIdToPatternIdMap
a map pixmapId to patternId map
Definition: MacDraft5StyleManager.cxx:386
long end() const
returns the end offset
Definition: MWAWEntry.hxx:77
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:383
void initPatterns()
init the patterns list
Definition: MacDraft5StyleManager.cxx:445
MWAWBox2i m_rect
the pixmap rectangle
Definition: MacDraft5StyleManager.cxx:284
bool readDashes(MWAWEntry const &entry, bool inRsrc)
try to read a list of dashs : DASH 128
Definition: MacDraft5StyleManager.cxx:1162
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1132
std::string m_extra
extra data
Definition: MWAWRSRCParser.hxx:148
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:348
std::map< int, shared_ptr< Pixmap > > m_pixIdToPixmapMap
a map pixmapId to pixmap map
Definition: MacDraft5StyleManager.cxx:384
std::string updateArrows(int startId, int endId, MWAWGraphicStyle &style)
update the arrow style
Definition: MacDraft5StyleManager.cxx:585
unsigned char getRed() const
returns the red value
Definition: libmwaw_internal.hxx:255
Internal and low level: a class used to read pack/unpack color pixmap of a MacDraf5StyleManager.
Definition: MacDraft5StyleManager.cxx:67
void addPos(long pos)
adds a new position in the file
Definition: MWAWDebug.cxx:53
std::vector< float > m_lineDashWidth
the dash array: a sequence of (fullsize, emptysize)
Definition: MWAWGraphicStyle.hxx:373
std::vector< MWAWColor > m_colorList
the color list
Definition: MacDraft5StyleManager.cxx:374
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:88
shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:513
bool readPICT(MWAWEntry const &entry, librevenge::RVNGBinaryData &pict)
try to read a PICT entry (in data fork)
Definition: MacDraft5Parser.cxx:2404
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
an interface used to insert comment in a binary file, written in ascii form (if debug_with_files is n...
Definition: MWAWDebug.hxx:66
int m_compSize
logical bits by components
Definition: MacDraft5StyleManager.cxx:292
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:270
int m_countryCode
the country code
Definition: MWAWRSRCParser.hxx:150
std::map< long, MWAWEntry > m_beginToBitmapEntryMap
a map file position to entry ( used to stored intermediar zones )
Definition: MacDraft5StyleManager.cxx:380
bool getBitmap(int bId, MWAWEmbeddedObject &picture) const
try to get a bitmap
Definition: MacDraft5StyleManager.cxx:714
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:455
bool readLinks(MWAWEntry const &entry, bool inRsrc)
try to read Link:128 resource
Definition: MacDraft5Parser.cxx:2637
bool getDash(int id, std::vector< float > &dash)
returns the dash
Definition: MacDraft5StyleManager.cxx:348
unsigned char getGreen() const
returns the green value
Definition: libmwaw_internal.hxx:260
std::vector< MWAWGraphicStyle::Pattern > m_patternList
the patterns list
Definition: MacDraft5StyleManager.cxx:376
bool readResources()
try to read the resource block: either the resource fork(v4) or last file's part (v5)
Definition: MacDraft5StyleManager.cxx:825
virtual bool valid() const
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:376
bool readOpcd(MWAWEntry const &entry, bool inRsrc)
try to read Opcd:131 resource (unknown)
Definition: MacDraft5StyleManager.cxx:1661
void updatePatterns()
try to update the pattern list
Definition: MacDraft5StyleManager.cxx:754
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
std::stringstream DebugStream
a basic stream (if debug_with_files is not defined, does nothing)
Definition: MWAWDebug.hxx:61
int m_mode
the encoding mode ?
Definition: MacDraft5StyleManager.cxx:302
int m_packType
the packing format
Definition: MacDraft5StyleManager.cxx:286
bool readVersion(MWAWEntry &entry)
try to read a version (in data fork)
Definition: MacDraft5StyleManager.cxx:1489
long m_rsrcBegin
the begin of the rsrc data
Definition: MacDraft5StyleManager.cxx:370
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:58
Generated on Wed Jun 17 2020 06:30:10 for libmwaw by
doxygen 1.8.18