MWAWBox2< T > Class Template Reference documentation

Public Member Functions | Protected Attributes | Friends | List of all members
MWAWBox2< T > Class Template Reference

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

`#include <libmwaw_internal.hxx>`

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

## Protected Attributes
std::pair< MWAWVec2< T >, MWAWVec2< T > > | m_data
| the data More...

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

## Detailed Description

### template<class T>
class MWAWBox2< T >

small class which defines a 2D Box

## Constructor & Destructor Documentation

## ◆ MWAWBox2() [1/2]

template<class T >

MWAWBox2< T >::MWAWBox2 | ( | MWAWVec2< T > | minPt = `MWAWVec2<T>()`,
|  | MWAWVec2< T > | maxPt = `MWAWVec2<T>()`
| ) |  |
| inlineexplicit

constructor

## ◆ MWAWBox2() [2/2]

template<class T >
template<class U >

MWAWBox2< T >::MWAWBox2 | ( | MWAWBox2< U > const & | p | ) |
| inlineexplicit

generic constructor

## Member Function Documentation

## ◆ center()

template<class T >

MWAWVec2<T> MWAWBox2< T >::center | ( |  | ) | const
| inline

the box center

Referenced by MWAWGraphicShape::getPath(), CricketDrawParserInternal::Shape::getTransformation(), Canvas5StyleManager::readColorStyle(), MacDrawProParser::readGeometryShapeData(), MacDraftParser::readObject(), MacDrawParser::readObject(), SuperPaintParser::readShape(), ClarisDrawGraph::readShape(), ClarisWksGraph::readShape(), BeagleWksDRParser::readStyle(), MWAWBox2< T >::resizeFromCenter(), libmwaw::rotateBoxFromCenter(), Canvas5Graph::send(), CricketDrawParser::send(), MacDraftParser::send(), CricketDrawParser::sendBitmap(), PowerPoint3Parser::sendFrame(), PowerPoint7Graph::sendFrame(), FreeHandParser::sendPicture(), Canvas5Graph::sendSpecial(), FreeHandParser::sendTextbox(), MacDraftParserInternal::Shape::transform(), MWAWGraphicShape::transform(), ClarisDrawStyleManagerInternal::Gradient::update(), and PowerPoint7GraphInternal::FrameArc::updateShape().

## ◆ extend()

template<class T >

void MWAWBox2< T >::extend | ( | T | val | ) |
| inline

extends the bdbox by (val, val) keeping the center

Referenced by MWAWPict::getBdBox(), MWAWGraphicShape::getBdBox(), MsWksGraphInternal::Zone::getLocalBox(), HanMacWrdJGraph::sendGroupChild(), and HanMacWrdKGraph::sendGroupChild().

## ◆ getIntersection()

template<class T >

MWAWBox2<T> MWAWBox2< T >::getIntersection | ( | MWAWBox2< T > const & | box | ) | const
| inline

returns the intersection between this and box

Referenced by ApplePictParser::drawRectangle().

## ◆ getUnion()

template<class T >

MWAWBox2<T> MWAWBox2< T >::getUnion | ( | MWAWBox2< T > const & | box | ) | const
| inline

returns the union between this and box

Referenced by MacDrawProParser::computeLayersAndLibrariesBoundingBox(), ApplePictParser::drawPolygon(), ClarisWksStruct::DSET::getUnionChildBox(), MWAWGraphicShape::offsetVertices(), RagTime5Graph::readGraphicShape(), MacDraftParser::readObject(), MacDraft5Parser::readObject(), MWAWGraphicShape::rotate(), MacDraft5ParserInternal::Shape::rotateBox(), MacDraftParserInternal::Shape::rotateBox(), MacDraftParser::sendBitmap(), ClarisWksGraph::sendGroup(), GreatWksGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), MWAWGraphicShape::transform(), ClarisWksStruct::DSET::updateChildPositions(), PowerPoint3ParserInternal::Polygon::updateShape(), PowerPoint7GraphInternal::FramePolygon::updateShape(), and FreeHandParserInternal::Shape::updateShape().

## ◆ max() [1/2]

template<class T >

MWAWVec2<T>& MWAWBox2< T >::max | ( |  | ) |
| inline

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

## ◆ max() [2/2]

template<class T >

MWAWVec2<T> const& MWAWBox2< T >::max | ( |  | ) | const
| inline

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

Referenced by MacWrtProStructuresInternal::Cell::Cell(), MsWksGraph::getEntryPicture(), MWAWGraphicShape::getPath(), MWAWTableInternal::Compare::Point::getPos(), MWAWTransformation::operator*(), CricketDrawParser::readShape(), MWAWGraphicShape::scale(), FreeHandParser::sendPicture(), NisusWrtText::sendText(), FreeHandParser::sendTextbox(), MWAWGraphicShape::translate(), and WriteNowTextInternal::TableData::updateCell().

## ◆ min() [1/2]

template<class T >

MWAWVec2<T>& MWAWBox2< T >::min | ( |  | ) |
| inline

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

## ◆ min() [2/2]

template<class T >

MWAWVec2<T> const& MWAWBox2< T >::min | ( |  | ) | const
| inline

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

Referenced by MacWrtProStructuresInternal::Cell::Cell(), MsWksGraph::getEntryPicture(), MsWksGraphInternal::Zone::getLocalBox(), MWAWGraphicShape::getPath(), MWAWTableInternal::Compare::Point::getPos(), MacWrtProStructuresInternal::Graphic::getPosition(), MsWksGraphInternal::Zone::getPosition(), MWAWTransformation::operator*(), MsWksDocument::readGroupHeaderFooter(), CricketDrawParser::readShape(), MWAWGraphicShape::scale(), NisusWrtGraph::sendPageGraphics(), FreeHandParser::sendPicture(), NisusWrtText::sendText(), FreeHandParser::sendTextbox(), MWAWGraphicShape::translate(), and WriteNowTextInternal::TableData::updateCell().

## ◆ operator!=()

template<class T >

bool MWAWBox2< T >::operator!= | ( | MWAWBox2< T > const & | mat | ) | const
| inline

operator!=

## ◆ operator<()

template<class T >

bool MWAWBox2< T >::operator< | ( | MWAWBox2< T > const & | mat | ) | const
| inline

operator<

## ◆ operator<=()

template<class T >

bool MWAWBox2< T >::operator<= | ( | MWAWBox2< T > const & | mat | ) | const
| inline

operator<=

## ◆ operator==()

template<class T >

bool MWAWBox2< T >::operator== | ( | MWAWBox2< T > const & | mat | ) | const
| inline

operator==

## ◆ operator>()

template<class T >

bool MWAWBox2< T >::operator> | ( | MWAWBox2< T > const & | mat | ) | const
| inline

operator>

## ◆ operator>=()

template<class T >

bool MWAWBox2< T >::operator>= | ( | MWAWBox2< T > const & | mat | ) | const
| inline

operator>=

## ◆ operator[]()

template<class T >

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

the two extremum points which defined the box

Parameters

  c | 0 means the minimum and 1 the maximum

## ◆ resizeFromCenter()

template<class T >

void MWAWBox2< T >::resizeFromCenter | ( | MWAWVec2< T > const & | sz | ) |
| inline

resize the box keeping the center

## ◆ resizeFromMax()

template<class T >

void MWAWBox2< T >::resizeFromMax | ( | MWAWVec2< T > const & | sz | ) |
| inline

resize the box keeping the maximum

## ◆ resizeFromMin()

template<class T >

void MWAWBox2< T >::resizeFromMin | ( | MWAWVec2< T > const & | sz | ) |
| inline

resize the box keeping the minimum

## ◆ scale()

template<class T >
template<class U >

void MWAWBox2< T >::scale | ( | U | factor | ) |
| inline

scales all points of the box by factor

## ◆ set()

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().

## ◆ setMax()

template<class T >

void MWAWBox2< T >::setMax | ( | MWAWVec2< T > const & | y | ) |
| inline

resets the maximum point

Referenced by BeagleWksSSParser::readChart(), RagTimeParser::readDataZoneHeader(), and MWAWTable::sendExtraLines().

## ◆ setMin()

template<class T >

void MWAWBox2< T >::setMin | ( | MWAWVec2< T > const & | x | ) |
| inline

resets the minimum point

Referenced by BeagleWksSSParser::readChart(), RagTimeParser::readDataZoneHeader(), and MWAWTable::sendExtraLines().

## ◆ size()

template<class T >

MWAWVec2<T> MWAWBox2< T >::size | ( |  | ) | const
| inline

the box size

Referenced by MWAWGraphicShape::addTo(), ApplePictParser::checkHeader(), MWAWPictMac::checkOrGet(), MacDocParser::createZones(), ApplePictParser::drawBitmap(), ClarisWksStruct::DSET::findForbiddenPagesBreaking(), ClarisWksGraph::findMasterPage(), ApplePictParserInternal::Bitmap::get(), ApplePictParserInternal::Pixmap::get(), MacDraft5StyleManagerInternal::Pixmap::get(), MWAWPictData::get(), ClarisDrawGraphInternal::Zone::getBdBox(), ClarisWksGraphInternal::Zone::getBdBox(), ClarisWksStruct::DSET::getBdBox(), ClarisWksStruct::DSET::Child::getBdBox(), HanMacWrdJGraphInternal::Frame::getBdBox(), HanMacWrdKGraphInternal::Frame::getBdBox(), MWAWGraphicShape::getBdBox(), CanvasGraph::getBitmap(), DrawTableParser::getBitmap(), CanvasGraph::getBitmapBW(), MsWksGraph::getEntryPicture(), MsWksGraphInternal::Zone::getLocalBox(), MWAWGraphicShape::getPath(), MacWrtProStructuresInternal::Graphic::getPosition(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Graphic::getRelativeYPos(), MWAWTableInternal::Compare::Point::getSize(), MWAWTextListener::insertShape(), MWAWGraphicListener::MWAWGraphicListener(), MWAWSpreadsheetListener::MWAWSpreadsheetListener(), MacDraftParserInternal::BitmapFileData::ok(), MWAWTableInternal::Compare::operator()(), libmwaw_applepict1::Bitmap::read(), ApplePictParser::readBitmap(), MacDrawProParser::readBitmap(), MacDraftParser::readBitmapData(), ApplePictParserInternal::Bitmap::readBitmapData(), libmwaw_applepict1::Bitmap::readBitmapData(), PowerPoint1Parser::readDocInfo(), PowerPoint3Parser::readDocInfo(), GreatWksGraph::readFrameHeader(), MacWrtParser::readGraphic(), MindWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MsWksDocument::readGroupHeaderFooter(), MacDraftParser::readObject(), MacDrawParser::readObject(), NisusWrtParser::readPageLimit(), ApplePictParser::readPixmap(), ApplePictParserInternal::Pixmap::readPixmapData(), MacDraft5StyleManagerInternal::Pixmap::readPixmapData(), SuperPaintParser::readShape(), ClarisDrawGraph::readShape(), ClarisWksGraph::readShape(), HanMacWrdJGraph::readShapeGraph(), HanMacWrdKGraph::readShapeGraph(), BeagleWksDRParser::readStyle(), libmwaw_applepict1::Bitmap::saveBitmap(), Canvas5Graph::send(), CanvasGraph::send(), CricketDrawParser::send(), MsWksGraph::send(), MacDraft5Parser::send(), MacDraftParser::send(), MacDrawParser::send(), MacDrawProParser::send(), RagTime5Graph::send(), CricketDrawParser::sendAll(), CricketDrawParser::sendBitmap(), MacDraftParser::sendBitmap(), MacDrawParser::sendBitmap(), MacDrawProParser::sendBitmap(), HanMacWrdJGraph::sendComment(), Canvas5Graph::sendDimension(), CanvasGraph::sendDimension(), MWAWTable::sendExtraLines(), HanMacWrdJGraph::sendFrame(), HanMacWrdKGraph::sendFrame(), PowerPoint1Parser::sendFrame(), PowerPoint3Parser::sendFrame(), PowerPoint7Graph::sendFrame(), ActaText::sendGraphic(), FullWrtGraph::sendGraphic(), ClarisWksGraph::sendGroup(), GreatWksGraph::sendGroup(), HanMacWrdJGraph::sendGroup(), HanMacWrdKGraph::sendGroup(), ClarisDrawGraph::sendGroup(), GreatWksGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), ClarisDrawGraph::sendMainGroupChild(), MouseWrtParser::sendMainZone(), CanvasGraph::sendMultiLines(), ClarisWksGraph::sendPageChild(), NisusWrtGraph::sendPageGraphics(), LightWayTxtGraph::sendPICT(), ClarisWksGraph::sendPicture(), FreeHandParser::sendPicture(), TeachTxtParser::sendPicture(), EDocParser::sendPicture(), DocMkrParser::sendPicture(), MacDocParser::sendPicture(), WriteNowParser::sendPicture(), HanMacWrdJGraph::sendPictureFrame(), HanMacWrdKGraph::sendPictureFrame(), BeagleWksDRParser::sendPictures(), DrawTableParser::sendShape(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), FreeHandParser::sendShape(), HanMacWrdJGraph::sendShapeGraph(), HanMacWrdKGraph::sendShapeGraph(), FullWrtGraph::sendSideBar(), Canvas5Graph::sendSpecial(), CanvasGraph::sendSpecial(), MoreText::sendText(), NisusWrtText::sendText(), FreeHandParser::sendTextbox(), HanMacWrdJGraph::sendTextbox(), HanMacWrdKGraph::sendTextBox(), GreatWksGraph::sendTextboxAsGraphic(), ApplePictParserInternal::State::updatePosition(), PowerPoint3ParserInternal::Polygon::updateShape(), PowerPoint7GraphInternal::FrameArc::updateShape(), and PowerPoint7GraphInternal::FramePolygon::updateShape().

## Friends And Related Function Documentation

## ◆ operator<<

template<class T >

std::ostream& operator<< | ( | std::ostream & | o,
|  | MWAWBox2< T > const & | f
| ) |  |
| friend

print data in form X0xY0<->X1xY1

## Member Data Documentation

## ◆ m_data

template<class T >

std::pair<MWAWVec2<T>, MWAWVec2<T> > MWAWBox2< T >::m_data
| protected

the data

Referenced by MWAWBox2< T >::center(), MWAWBox2< T >::extend(), MWAWBox2< T >::getIntersection(), MWAWBox2< T >::getUnion(), MWAWBox2< T >::max(), MWAWBox2< T >::min(), MWAWBox2< T >::operator!=(), MWAWBox2< T >::operator<(), MWAWBox2< T >::operator<=(), MWAWBox2< T >::operator==(), MWAWBox2< T >::operator>(), MWAWBox2< T >::operator>=(), MWAWBox2< T >::operator[](), MWAWBox2< T >::resizeFromCenter(), MWAWBox2< T >::resizeFromMax(), MWAWBox2< T >::resizeFromMin(), MWAWBox2< T >::scale(), MWAWBox2< T >::set(), MWAWBox2< T >::setMax(), MWAWBox2< T >::setMin(), and MWAWBox2< T >::size().

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

- libmwaw_internal.hxx