MacDraft5StyleManager Class Reference

class to read/store MacDraft5 v4-v5 styles More...

#include <MacDraft5StyleManager.hxx>

Public Member Functions

 MacDraft5StyleManager (MacDraft5Parser &parser)
 constructor More...
 
virtual ~MacDraft5StyleManager ()
 destructor More...
 

Protected Member Functions

bool readResources ()
 try to read the resource block: either the resource fork(v4) or last file's part (v5) More...
 
bool readBitmapZones ()
 try to read the bitmap zones: end file(v4) or the zone before the rsrc part (v5) More...
 
long getEndDataPosition () const
 returns the end of data position (before the bitmap zones) if known or -1 More...
 
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). More...
 
std::string updateSurfaceStyle (int type, int id, MWAWGraphicStyle &style)
 update the surface graphic style ( using surface type and id ). More...
 
std::string updateArrows (int startId, int endId, MWAWGraphicStyle &style)
 update the arrow style More...
 
bool getColor (int cId, MWAWColor &color) const
 tries to return the color corresponding to an id More...
 
bool getBitmap (int bId, MWAWEmbeddedObject &picture) const
 try to get a bitmap More...
 
bool getPixmap (int pId, MWAWEmbeddedObject &picture, MWAWVec2i &pictSize, MWAWColor &avColor) const
 try to get a pixpat pattern More...
 
void updatePatterns ()
 try to update the pattern list More...
 
bool readResource (MWAWEntry &entry, bool inRsrc)
 try to read a resource More...
 
bool readBitmap (MWAWEntry const &entry)
 try to a bitmap More...
 
bool readColors (MWAWEntry const &entry, bool inRsrc)
 try to read a list of colors : pltt 128 More...
 
bool readDashes (MWAWEntry const &entry, bool inRsrc)
 try to read a list of dashs : DASH 128 More...
 
bool readFonts (MWAWEntry const &entry, bool inRsrc)
 try to read FNUS:1 resource More...
 
bool readPatterns (MWAWEntry const &entry, bool inRsrc)
 try to read a list of patterns/gradient? : PLDT 128 More...
 
bool readPixPat (MWAWEntry const &entry, bool inRsrc)
 try to read a ppat resource More...
 
bool readVersion (MWAWEntry &entry)
 try to read a version (in data fork) More...
 
bool readRSRCList (MWAWEntry const &entry, bool inRsrc)
 try to read a resource list: PATL:128 or Opac:128+xxx More...
 
bool readBitmapList (MWAWEntry const &entry, bool inRsrc)
 try to read BITList:0 resource More...
 
bool readOpcd (MWAWEntry const &entry, bool inRsrc)
 try to read Opcd:131 resource (unknown) More...
 

Protected Attributes

MacDraft5Parserm_parser
 the main parser More...
 
MWAWParserStatePtr m_parserState
 the parser state More...
 
std::shared_ptr< MacDraft5StyleManagerInternal::Statem_state
 the state More...
 

Friends

class MacDraft5Parser
 

Detailed Description

class to read/store MacDraft5 v4-v5 styles

Constructor & Destructor Documentation

◆ MacDraft5StyleManager()

MacDraft5StyleManager::MacDraft5StyleManager ( MacDraft5Parser parser)
explicit

constructor

◆ ~MacDraft5StyleManager()

MacDraft5StyleManager::~MacDraft5StyleManager ( )
virtual

destructor

Member Function Documentation

◆ getBitmap()

bool MacDraft5StyleManager::getBitmap ( int  bId,
MWAWEmbeddedObject picture 
) const
protected

try to get a bitmap

◆ getColor()

bool MacDraft5StyleManager::getColor ( int  cId,
MWAWColor color 
) const
protected

tries to return the color corresponding to an id

◆ getEndDataPosition()

long MacDraft5StyleManager::getEndDataPosition ( ) const
protected

returns the end of data position (before the bitmap zones) if known or -1

◆ getPixmap()

bool MacDraft5StyleManager::getPixmap ( int  pId,
MWAWEmbeddedObject picture,
MWAWVec2i pictSize,
MWAWColor avColor 
) const
protected

try to get a pixpat pattern

Referenced by updatePatterns().

◆ readBitmap()

bool MacDraft5StyleManager::readBitmap ( MWAWEntry const &  entry)
protected

try to a bitmap

Referenced by readBitmapZones().

◆ readBitmapList()

bool MacDraft5StyleManager::readBitmapList ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read BITList:0 resource

Referenced by readResource().

◆ readBitmapZones()

bool MacDraft5StyleManager::readBitmapZones ( )
protected

try to read the bitmap zones: end file(v4) or the zone before the rsrc part (v5)

◆ readColors()

bool MacDraft5StyleManager::readColors ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read a list of colors : pltt 128

Referenced by readResource().

◆ readDashes()

bool MacDraft5StyleManager::readDashes ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read a list of dashs : DASH 128

Referenced by readResource().

◆ readFonts()

bool MacDraft5StyleManager::readFonts ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read FNUS:1 resource

Referenced by readResource().

◆ readOpcd()

bool MacDraft5StyleManager::readOpcd ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read Opcd:131 resource (unknown)

Referenced by readResource().

◆ readPatterns()

bool MacDraft5StyleManager::readPatterns ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read a list of patterns/gradient? : PLDT 128

Referenced by readResource().

◆ readPixPat()

bool MacDraft5StyleManager::readPixPat ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read a ppat resource

Referenced by readResource().

◆ readResource()

bool MacDraft5StyleManager::readResource ( MWAWEntry entry,
bool  inRsrc 
)
protected

try to read a resource

Referenced by readResources().

◆ readResources()

bool MacDraft5StyleManager::readResources ( )
protected

try to read the resource block: either the resource fork(v4) or last file's part (v5)

◆ readRSRCList()

bool MacDraft5StyleManager::readRSRCList ( MWAWEntry const &  entry,
bool  inRsrc 
)
protected

try to read a resource list: PATL:128 or Opac:128+xxx

Referenced by readResource().

◆ readVersion()

bool MacDraft5StyleManager::readVersion ( MWAWEntry entry)
protected

try to read a version (in data fork)

Referenced by readResource().

◆ updateArrows()

std::string MacDraft5StyleManager::updateArrows ( int  startId,
int  endId,
MWAWGraphicStyle style 
)
protected

update the arrow style

◆ updateLineStyle()

std::string MacDraft5StyleManager::updateLineStyle ( int  type,
int  id,
int  dashId,
MWAWGraphicStyle style 
)
protected

update the line style ( using line type and col/pat id and the dashId).

Returns
a string which can be use as debug message

◆ updatePatterns()

void MacDraft5StyleManager::updatePatterns ( )
protected

try to update the pattern list

Referenced by readResources().

◆ updateSurfaceStyle()

std::string MacDraft5StyleManager::updateSurfaceStyle ( int  type,
int  id,
MWAWGraphicStyle style 
)
protected

update the surface graphic style ( using surface type and id ).

Returns
a string which can be use as debug message

Friends And Related Function Documentation

◆ MacDraft5Parser

friend class MacDraft5Parser
friend

Member Data Documentation

◆ m_parser

MacDraft5Parser& MacDraft5StyleManager::m_parser
protected

the main parser

Referenced by readResource().

◆ m_parserState

◆ m_state


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

Generated on Fri Sep 18 2020 18:14:52 for libmwaw by doxygen 1.8.20