Go to the documentation of this file.
34 #ifndef MACDRAFT5_STYLE_MANAGER
35 # define MACDRAFT5_STYLE_MANAGER
40 #include <librevenge/librevenge.h>
130 std::shared_ptr<MacDraft5StyleManagerInternal::State>
m_state;
basic class to store an entry in a file This contained :
Definition: MWAWEntry.hxx:47
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:551
int m_majorVersion
the major number
Definition: MWAWRSRCParser.hxx:146
bool getColor(int id, MWAWColor &col)
returns a color if possible
Definition: MacDraft5StyleManager.cxx:345
a public structure used to return the version
Definition: MWAWRSRCParser.hxx:133
std::string m_string
the major string
Definition: MWAWRSRCParser.hxx:150
bool readResource(MWAWEntry &entry, bool inRsrc)
try to read a resource
Definition: MacDraft5StyleManager.cxx:965
friend std::ostream & operator<<(std::ostream &o, Pixmap const &f)
operator<< for Pixmap
Definition: MacDraft5StyleManager.cxx:88
MacDraft5StyleManager(MacDraft5Parser &parser)
constructor
Definition: MacDraft5StyleManager.cxx:586
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:129
std::map< int, std::shared_ptr< Pixmap > > m_pixIdToPixmapMap
a map pixmapId to pixmap map
Definition: MacDraft5StyleManager.cxx:404
void setColors(std::vector< MWAWColor > const &cols)
sets the array of indexed colors
Definition: MWAWPictBitmap.hxx:446
void setSurfaceColor(MWAWColor const &col, float opacity=1)
set the surface color
Definition: MWAWGraphicStyle.hxx:415
int m_version
the pixmap version
Definition: MacDraft5StyleManager.cxx:296
bool readPixmapData(MWAWInputStream &input)
parses the pixmap data zone
Definition: MacDraft5StyleManager.cxx:96
void set(int i, int j, int v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:425
bool readPatterns(MWAWEntry const &entry, bool inRsrc)
try to read a list of patterns/gradient? : PLDT 128
Definition: MacDraft5StyleManager.cxx:1228
bool readPICTList(MWAWEntry const &entry, bool inRsrc)
try to read the PICT unknown entry: pnot:0
Definition: MacDraft5Parser.cxx:2547
Pixmap()
Definition: MacDraft5StyleManager.cxx:68
float m_surfaceOpacity
true if the surface has some color
Definition: MWAWGraphicStyle.hxx:520
virtual ~MacDraft5StyleManager()
destructor
Definition: MacDraft5StyleManager.cxx:593
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libmwaw_internal.hxx:512
static MWAWColor white()
return the white color
Definition: libmwaw_internal.hxx:250
bool getPattern(int id, MWAWGraphicStyle::Pattern &pat)
returns a pattern if possible
Definition: MacDraft5StyleManager.cxx:357
int id() const
returns the id
Definition: MWAWEntry.hxx:164
bool get(MWAWEmbeddedObject &picture, MWAWVec2i &pictSize, MWAWColor &avColor) const
returns the pixmap
Definition: MacDraft5StyleManager.cxx:211
the class to store a color
Definition: libmwaw_internal.hxx:192
small class use to define a embedded object
Definition: libmwaw_internal.hxx:467
std::string const & type() const
returns the type of the entry
Definition: MWAWEntry.hxx:137
int m_pixelType
format of pixel image
Definition: MacDraft5StyleManager.cxx:300
State()
constructor
Definition: MacDraft5StyleManager.cxx:320
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:392
int m_resolution[2]
horizontal/vertical definition
Definition: MacDraft5StyleManager.cxx:299
bool readRSRCList(MWAWEntry const &entry, bool inRsrc)
try to read a resource list: PATL:128 or Opac:128+xxx
Definition: MacDraft5StyleManager.cxx:1641
bool readFonts(MWAWEntry const &entry, bool inRsrc)
try to read FNUS:1 resource
Definition: MacDraft5StyleManager.cxx:1075
bool readColors(MWAWEntry const &entry, bool inRsrc)
try to read a list of colors : pltt 128
Definition: MacDraft5StyleManager.cxx:1125
void setParsed(bool ok=true) const
sets the flag m_parsed to true or false
Definition: MWAWEntry.hxx:126
bool getBinary(MWAWEmbeddedObject &picture) const override
returns the final picture
Definition: MWAWPictBitmap.hxx:225
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:1552
std::vector< int > m_indices
the pixmap indices
Definition: MacDraft5StyleManager.cxx:309
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:363
void set(int i, int j, MWAWColor const &v)
sets a cell contents
Definition: MWAWPictBitmap.hxx:529
int m_pixelSize
physical bit by image
Definition: MacDraft5StyleManager.cxx:301
Internal: the state of a MacDraft5StyleManager.
Definition: MacDraft5StyleManager.cxx:318
bool readLayoutDefinitions(MWAWEntry const &entry, bool inRsrc)
try to read a LAYI:0 resource
Definition: MacDraft5Parser.cxx:2587
float m_lineOpacity
the line opacity: 0=transparent
Definition: MWAWGraphicStyle.hxx:514
bool valid() const final
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:489
void initArrows()
init the arrow list
Definition: MacDraft5StyleManager.cxx:409
int m_minorVersion
the minor number
Definition: MWAWRSRCParser.hxx:148
std::vector< MWAWColor > m_colorTable
the color table
Definition: MacDraft5StyleManager.cxx:307
a basic pattern used in a MWAWGraphicStyle:
Definition: MWAWGraphicStyle.hxx:277
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:630
std::vector< MWAWColor > m_colors
the colors
Definition: MacDraft5StyleManager.cxx:311
void setType(std::string const &newType)
sets the type of the entry: BTEP,FDPP, BTEC, FDPC, PLC , TEXT, ...
Definition: MWAWEntry.hxx:132
std::string m_versionString
the version string
Definition: MWAWRSRCParser.hxx:152
long m_packSize
size of data in the packed state
Definition: MacDraft5StyleManager.cxx:298
void skipZone(long beginPos, long endPos)
skips the file zone defined by beginPos-endPos
Definition: MWAWDebug.hxx:113
int m_rowBytes
the num of bytes used to store a row
Definition: MacDraft5StyleManager.cxx:294
void initDashs()
init the dashs list
Definition: MacDraft5StyleManager.cxx:504
T y() const
second element
Definition: libmwaw_internal.hxx:673
long getEndDataPosition() const
returns the end of data position (before the bitmap zones) if known or -1
Definition: MacDraft5StyleManager.cxx:597
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:193
float m_lineWidth
the linewidth
Definition: MWAWGraphicStyle.hxx:508
T x() const
first element
Definition: libmwaw_internal.hxx:668
std::shared_ptr< MacDraft5StyleManagerInternal::State > m_state
the state
Definition: MacDraft5StyleManager.hxx:130
void initColors()
init the color list
Definition: MacDraft5StyleManager.cxx:444
unsigned char getBlue() const
returns the green value
Definition: libmwaw_internal.hxx:269
std::string updateSurfaceStyle(int type, int id, MWAWGraphicStyle &style)
update the surface graphic style ( using surface type and id ).
Definition: MacDraft5StyleManager.cxx:686
bool readViews(MWAWEntry const &entry, bool inRsrc)
try to read a list of views : VIEW:1
Definition: MacDraft5Parser.cxx:2471
void setBegin(long off)
sets the begin offset
Definition: MWAWEntry.hxx:67
bool isBlack() const
return true if the color is black
Definition: libmwaw_internal.hxx:284
long m_dataEnd
the end of the main data zone
Definition: MacDraft5StyleManager.cxx:388
int m_compCount
logical components per pixels
Definition: MacDraft5StyleManager.cxx:302
MWAWVec2i m_dim
the dimension width x height
Definition: MWAWGraphicStyle.hxx:358
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition: libmwaw_internal.hxx:561
long length() const
returns the length of the zone
Definition: MWAWEntry.hxx:93
long m_planeBytes
offset to the next plane
Definition: MacDraft5StyleManager.cxx:304
bool readBitmapZones()
try to read the bitmap zones: end file(v4) or the zone before the rsrc part (v5)
Definition: MacDraft5StyleManager.cxx:811
long begin() const
returns the begin offset
Definition: MWAWEntry.hxx:83
void setLength(long l)
sets the zone size
Definition: MWAWEntry.hxx:72
bool getPixmap(int pId, MWAWEmbeddedObject &picture, MWAWVec2i &pictSize, MWAWColor &avColor) const
try to get a pixpat pattern
Definition: MacDraft5StyleManager.cxx:757
bool getColor(int cId, MWAWColor &color) const
tries to return the color corresponding to an id
Definition: MacDraft5StyleManager.cxx:602
Arrow m_arrows[2]
the two arrows corresponding to start and end extremity
Definition: MWAWGraphicStyle.hxx:553
void setPattern(Pattern const &pat, float opacity=1)
set the pattern
Definition: MWAWGraphicStyle.hxx:426
std::vector< std::vector< float > > m_dashList
the list of dash
Definition: MacDraft5StyleManager.cxx:398
static MWAWColor black()
return the back color
Definition: libmwaw_internal.hxx:245
the main class to read a MacDraft5 v4-v5 file
Definition: MacDraft5Parser.hxx:62
bool readBitmap(MWAWEntry const &entry)
try to a bitmap
Definition: MacDraft5StyleManager.cxx:1300
void setId(int newId)
sets the id
Definition: MWAWEntry.hxx:169
Internal: the structures of a MacDraft5StyleManager.
Definition: MacDraft5StyleManager.cxx:61
bool getArrow(int id, MWAWGraphicStyle::Arrow &arrow)
returns an arrow if possible
Definition: MacDraft5StyleManager.cxx:334
MacDraft5Parser & m_parser
the main parser
Definition: MacDraft5StyleManager.hxx:126
MWAWColor m_colors[2]
the two indexed colors
Definition: MWAWGraphicStyle.hxx:361
float m_width
the arrow width in point
Definition: MWAWGraphicStyle.hxx:133
bool readPixPat(MWAWEntry const &entry, bool inRsrc)
try to read a ppat resource
Definition: MacDraft5StyleManager.cxx:1378
std::map< int, size_t > m_pixIdToPatternIdMap
a map pixmapId to patternId map
Definition: MacDraft5StyleManager.cxx:406
long end() const
returns the end offset
Definition: MWAWEntry.hxx:88
MWAWColor m_lineColor
the line color
Definition: MWAWGraphicStyle.hxx:516
void initPatterns()
init the patterns list
Definition: MacDraft5StyleManager.cxx:465
MWAWBox2i m_rect
the pixmap rectangle
Definition: MacDraft5StyleManager.cxx:295
bool readDashes(MWAWEntry const &entry, bool inRsrc)
try to read a list of dashs : DASH 128
Definition: MacDraft5StyleManager.cxx:1181
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition: libmwaw_internal.hxx:1191
std::string m_extra
extra data
Definition: MWAWRSRCParser.hxx:154
bool valid() const final
returns true if the picture is valid
Definition: MWAWPictBitmap.hxx:385
a bitmap of int to store indexed bitmap
Definition: MWAWPictBitmap.hxx:357
std::string updateArrows(int startId, int endId, MWAWGraphicStyle &style)
update the arrow style
Definition: MacDraft5StyleManager.cxx:607
unsigned char getRed() const
returns the red value
Definition: libmwaw_internal.hxx:274
Internal and low level: a class used to read pack/unpack color pixmap of a MacDraf5StyleManager.
Definition: MacDraft5StyleManager.cxx:67
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition: libmwaw_internal.hxx:557
std::map< int, std::shared_ptr< Pixmap > > m_bitmapIdToPixmapMap
a map bitmapId to pixmap map
Definition: MacDraft5StyleManager.cxx:402
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:506
std::vector< MWAWColor > m_colorList
the color list
Definition: MacDraft5StyleManager.cxx:394
bool valid() const
returns true if the zone length is positive
Definition: MWAWEntry.hxx:99
bool readPICT(MWAWEntry const &entry, librevenge::RVNGBinaryData &pict)
try to read a PICT entry (in data fork)
Definition: MacDraft5Parser.cxx:2441
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1067
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:303
bool isWhite() const
return true if the color is white
Definition: libmwaw_internal.hxx:289
int m_countryCode
the country code
Definition: MWAWRSRCParser.hxx:156
std::map< long, MWAWEntry > m_beginToBitmapEntryMap
a map file position to entry ( used to stored intermediar zones )
Definition: MacDraft5StyleManager.cxx:400
bool getBitmap(int bId, MWAWEmbeddedObject &picture) const
try to get a bitmap
Definition: MacDraft5StyleManager.cxx:736
a bitmap of MWAWColor to store true color bitmap
Definition: MWAWPictBitmap.hxx:469
bool readLinks(MWAWEntry const &entry, bool inRsrc)
try to read Link:128 resource
Definition: MacDraft5Parser.cxx:2674
bool getDash(int id, std::vector< float > &dash)
returns the dash
Definition: MacDraft5StyleManager.cxx:368
unsigned char getGreen() const
returns the green value
Definition: libmwaw_internal.hxx:279
std::vector< MWAWGraphicStyle::Pattern > m_patternList
the patterns list
Definition: MacDraft5StyleManager.cxx:396
bool readResources()
try to read the resource block: either the resource fork(v4) or last file's part (v5)
Definition: MacDraft5StyleManager.cxx:845
bool readOpcd(MWAWEntry const &entry, bool inRsrc)
try to read Opcd:131 resource (unknown)
Definition: MacDraft5StyleManager.cxx:1680
void updatePatterns()
try to update the pattern list
Definition: MacDraft5StyleManager.cxx:776
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:838
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:313
int m_packType
the packing format
Definition: MacDraft5StyleManager.cxx:297
bool readVersion(MWAWEntry &entry)
try to read a version (in data fork)
Definition: MacDraft5StyleManager.cxx:1508
long m_rsrcBegin
the begin of the rsrc data
Definition: MacDraft5StyleManager.cxx:390
a structure used to define an arrow
Definition: MWAWGraphicStyle.hxx:56
Generated on Fri Sep 18 2020 18:14:52 for libmwaw by
doxygen 1.8.20