MWAWBox2< T > Class Template Reference

small class which defines a 2D Box More...

#include <libmwaw_internal.hxx>

List of all members.

Classes

struct  PosSizeLt
 internal struct used to create sorted map, sorted first min then max More...

Public Types

typedef std::map< MWAWBox2< T >
, T, struct PosSizeLt
Map
 map of MWAWBox2

Public Member Functions

 MWAWBox2 (MWAWVec2< T > minPt=MWAWVec2< T >(), MWAWVec2< T > maxPt=MWAWVec2< T >())
 constructor
template<class U >
 MWAWBox2 (MWAWBox2< U > const &p)
 generic constructor
MWAWVec2< T > const & min () const
 the minimum 2D point (in x and in y)
MWAWVec2< T > const & max () const
 the maximum 2D point (in x and in y)
MWAWVec2< T > & min ()
 the minimum 2D point (in x and in y)
MWAWVec2< T > & max ()
 the maximum 2D point (in x and in y)
MWAWVec2< T > const & operator[] (int c) const
 the two extremum points which defined the box
MWAWVec2< T > size () const
 the box size
MWAWVec2< T > center () const
 the box center
void set (MWAWVec2< T > const &x, MWAWVec2< T > const &y)
 resets the data to minimum x and maximum y
void setMin (MWAWVec2< T > const &x)
 resets the minimum point
void setMax (MWAWVec2< T > const &y)
 resets the maximum point
void resizeFromMin (MWAWVec2< T > const &sz)
 resize the box keeping the minimum
void resizeFromMax (MWAWVec2< T > const &sz)
 resize the box keeping the maximum
void resizeFromCenter (MWAWVec2< T > const &sz)
 resize the box keeping the center
template<class U >
void scale (U factor)
 scales all points of the box by factor
void extend (T val)
 extends the bdbox by (val, val) keeping the center
MWAWBox2< T > getUnion (MWAWBox2< T > const &box) const
 returns the union between this and box
MWAWBox2< T > getIntersection (MWAWBox2< T > const &box) const
 returns the intersection between this and box
bool operator== (MWAWBox2< T > const &p) const
 comparison operator==
bool operator!= (MWAWBox2< T > const &p) const
 comparison operator!=
bool operator< (MWAWBox2< T > const &p) const
 comparison operator< : fist sorts min by Y,X values then max extremity
int cmp (MWAWBox2< T > const &p) const
 comparison function : fist sorts min by Y,X values then max extremity

Protected Attributes

MWAWVec2< T > m_pt [2]
 the two extremities

Friends

std::ostream & operator<< (std::ostream &o, MWAWBox2< T > const &f)
 print data in form X0xY0<->X1xY1

Detailed Description

template<class T>
class MWAWBox2< T >

small class which defines a 2D Box


Member Typedef Documentation

template<class T>
MWAWBox2< T >::Map

map of MWAWBox2


Constructor & Destructor Documentation

template<class T>
MWAWBox2< T >::MWAWBox2 ( MWAWVec2< T >  minPt = MWAWVec2<T>(),
MWAWVec2< T >  maxPt = MWAWVec2<T>() 
) [inline]

constructor

template<class T>
template<class U >
MWAWBox2< T >::MWAWBox2 ( MWAWBox2< U > const &  p) [inline]

generic constructor


Member Function Documentation

template<class T>
int MWAWBox2< T >::cmp ( MWAWBox2< T > const &  p) const [inline]
template<class T>
void MWAWBox2< T >::extend ( val) [inline]
template<class T>
MWAWBox2<T> MWAWBox2< T >::getIntersection ( MWAWBox2< T > const &  box) const [inline]

returns the intersection between this and box

template<class T>
MWAWVec2<T>& MWAWBox2< T >::max ( ) [inline]

the maximum 2D point (in x and in y)

template<class T>
MWAWVec2<T>& MWAWBox2< T >::min ( ) [inline]

the minimum 2D point (in x and in y)

template<class T>
bool MWAWBox2< T >::operator!= ( MWAWBox2< T > const &  p) const [inline]

comparison operator!=

template<class T>
bool MWAWBox2< T >::operator< ( MWAWBox2< T > const &  p) const [inline]

comparison operator< : fist sorts min by Y,X values then max extremity

template<class T>
bool MWAWBox2< T >::operator== ( MWAWBox2< T > const &  p) const [inline]

comparison operator==

template<class T>
MWAWVec2<T> const& MWAWBox2< T >::operator[] ( int  c) const [inline]

the two extremum points which defined the box

Parameters:
c0 means the minimum and 1 the maximum
template<class T>
void MWAWBox2< T >::resizeFromCenter ( MWAWVec2< T > const &  sz) [inline]

resize the box keeping the center

Referenced by ClarisDrawGraph::readShape().

template<class T>
void MWAWBox2< T >::resizeFromMax ( MWAWVec2< T > const &  sz) [inline]

resize the box keeping the maximum

template<class T>
void MWAWBox2< T >::resizeFromMin ( MWAWVec2< T > const &  sz) [inline]

resize the box keeping the minimum

template<class T>
template<class U >
void MWAWBox2< T >::scale ( factor) [inline]

scales all points of the box by factor

template<class T>
void MWAWBox2< T >::set ( MWAWVec2< T > const &  x,
MWAWVec2< T > const &  y 
) [inline]

resets the data to minimum x and maximum y

Referenced by MWAWPictMac::checkOrGet(), libmwaw_applepict1::Region::read(), and libmwaw_applepict1::OpCode::readRect().

template<class T>
void MWAWBox2< T >::setMin ( MWAWVec2< T > const &  x) [inline]
template<class T>
MWAWVec2<T> MWAWBox2< T >::size ( ) const [inline]

the box size

Referenced by MWAWGraphicShape::addTo(), MWAWPictMac::checkOrGet(), MacDrawProParser::computeLayersAndLibrariesBoundingBox(), MacDocParser::createZones(), RagTimeParser::createZones(), ClarisWksStruct::DSET::findForbiddenPagesBreaking(), ClarisWksGraph::findMasterPage(), MWAWPictData::get(), HanMacWrdKGraphInternal::Frame::getBdBox(), ClarisWksStruct::DSET::getBdBox(), MWAWGraphicShape::getBdBox(), ClarisWksStruct::DSET::Child::getBdBox(), ClarisWksGraphInternal::Zone::getBdBox(), ClarisDrawGraphInternal::Zone::getBdBox(), HanMacWrdJGraphInternal::Frame::getBdBox(), MsWksGraph::getEntryPicture(), MsWksGraphInternal::Zone::getLocalBox(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Block::getPosition(), MacWrtProStructuresInternal::Block::getRelativeYPos(), MWAWTableInternal::Compare::Point::getSize(), MWAWTextListener::insertPicture(), MWAWGraphicListener::MWAWGraphicListener(), MWAWSpreadsheetListener::MWAWSpreadsheetListener(), MacDraftParserInternal::BitmapFileData::ok(), MWAWTableInternal::Compare::operator()(), NisusWrtTextInternal::operator<<(), BeagleWksDRParserInternal::operator<<(), MarinerWrtParserInternal::operator<<(), ClarisWksStruct::operator<<(), operator<<(), libmwaw_applepict1::Bitmap::read(), libmwaw_applepict1::Pixmap::read(), MacDraftParser::readBitmapData(), libmwaw_applepict1::Bitmap::readBitmapData(), GreatWksGraph::readFrameHeader(), MacWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MsWksDocument::readGroupHeaderFooter(), NisusWrtParser::readPageLimit(), libmwaw_applepict1::Pixmap::readPixmapData(), SuperPaintParser::readShape(), ClarisDrawGraph::readShape(), ClarisWksGraph::readShape(), HanMacWrdJGraph::readShapeGraph(), HanMacWrdKGraph::readShapeGraph(), BeagleWksDRParser::readStyle(), libmwaw_applepict1::Bitmap::saveBitmap(), libmwaw_applepict1::Pixmap::savePixmap(), MacDrawParser::send(), MsWksGraph::send(), MacDraftParser::send(), RagTimeParser::send(), MacDrawProParser::send(), MacDrawParser::sendBitmap(), MacDraftParser::sendBitmap(), MacDrawProParser::sendBitmap(), HanMacWrdJGraph::sendComment(), MWAWTable::sendExtraLines(), HanMacWrdJGraph::sendFrame(), HanMacWrdKGraph::sendFrame(), ActaText::sendGraphic(), FullWrtGraph::sendGraphic(), ClarisDrawGraph::sendGroup(), GreatWksGraph::sendGroup(), ClarisWksGraph::sendGroup(), HanMacWrdKGraph::sendGroup(), HanMacWrdJGraph::sendGroup(), MsWksGraph::sendGroup(), GreatWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), ClarisDrawGraph::sendMainGroupChild(), ClarisWksGraph::sendPageChild(), NisusWrtGraph::sendPageGraphics(), HanMacWrdKGraph::sendPageGraphics(), HanMacWrdJGraph::sendPageGraphics(), LightWayTxtGraph::sendPICT(), MacDocParser::sendPicture(), EDocParser::sendPicture(), NisusWrtGraph::sendPicture(), TeachTxtParser::sendPicture(), DocMkrParser::sendPicture(), WriteNowParser::sendPicture(), MsWrdParser::sendPicture(), ClarisWksGraph::sendPicture(), HanMacWrdKGraph::sendPictureFrame(), HanMacWrdJGraph::sendPictureFrame(), SuperPaintParser::sendPictures(), BeagleWksDRParser::sendPictures(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), HanMacWrdJGraph::sendShapeGraph(), HanMacWrdKGraph::sendShapeGraph(), FullWrtGraph::sendSideBar(), NisusWrtText::sendText(), HanMacWrdKGraph::sendTextBox(), HanMacWrdJGraph::sendTextbox(), GreatWksGraph::sendTextboxAsGraphic(), and ClarisWksStruct::DSET::updateChildPositions().


Friends And Related Function Documentation

template<class T>
std::ostream& operator<< ( std::ostream &  o,
MWAWBox2< T > const &  f 
) [friend]

print data in form X0xY0<->X1xY1


Member Data Documentation


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