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... | |
small class which defines a 2D Box
|
inlineexplicit |
constructor
|
inlineexplicit |
generic constructor
the box center
Referenced by MWAWGraphicShape::getPath(), CricketDrawParserInternal::Shape::getTransformation(), Canvas5StyleManager::readGradient(), MacDraftParser::readObject(), SuperPaintParser::readShape(), ClarisDrawGraph::readShape(), ClarisWksGraph::readShape(), BeagleWksDRParser::readStyle(), MWAWBox2< int >::resizeFromCenter(), libmwaw::rotateBoxFromCenter(), CricketDrawParser::send(), MacDraftParser::send(), ScoopParser::send(), Canvas5Graph::send(), CricketDrawParser::sendBitmap(), PowerPoint7Graph::sendFrame(), PowerPoint3Parser::sendFrame(), Canvas5Graph::sendGIF(), FreeHandParser::sendPicture(), Canvas5Graph::sendSpecial(), FreeHandParser::sendTextbox(), MacDraftParserInternal::Shape::transform(), MWAWGraphicShape::transform(), ClarisDrawStyleManagerInternal::Gradient::update(), and PowerPoint7GraphInternal::FrameArc::updateShape().
|
inline |
extends the bdbox by (val, val) keeping the center
Referenced by MWAWPict::getBdBox(), MWAWGraphicShape::getBdBox(), MsWksGraphInternal::Zone::getLocalBox(), HanMacWrdKGraph::sendGroupChild(), and HanMacWrdJGraph::sendGroupChild().
|
inline |
returns the intersection between this and box
Referenced by ApplePictParser::drawRectangle().
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(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), MWAWGraphicShape::transform(), ClarisWksStruct::DSET::updateChildPositions(), PowerPoint7GraphInternal::FramePolygon::updateShape(), FreeHandParserInternal::Shape::updateShape(), and PowerPoint3ParserInternal::Polygon::updateShape().
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().
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(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Graphic::getPosition(), MWAWTransformation::operator*(), MsWksDocument::readGroupHeaderFooter(), CricketDrawParser::readShape(), MWAWGraphicShape::scale(), NisusWrtGraph::sendPageGraphics(), FreeHandParser::sendPicture(), NisusWrtText::sendText(), FreeHandParser::sendTextbox(), MWAWGraphicShape::translate(), and WriteNowTextInternal::TableData::updateCell().
operator!=
operator<=
operator==
operator>=
the two extremum points which defined the box
c | 0 means the minimum and 1 the maximum |
resize the box keeping the center
Referenced by Canvas5Graph::sendSpecial().
resize the box keeping the maximum
resize the box keeping the minimum
scales all points of the box by factor
|
inline |
resets the data to minimum x and maximum y
Referenced by MWAWPictMac::checkOrGet(), libmwaw_applepict1::Region::read(), and libmwaw_applepict1::OpCode::readRect().
resets the maximum point
Referenced by BeagleWksSSParser::readChart(), RagTimeParser::readDataZoneHeader(), Canvas5Image::readVKFL(), Canvas5Graph::sendDimension9(), and MWAWTable::sendExtraLines().
resets the minimum point
Referenced by BeagleWksSSParser::readChart(), RagTimeParser::readDataZoneHeader(), Canvas5Graph::sendDimension9(), and MWAWTable::sendExtraLines().
the box size
Referenced by MWAWGraphicShape::addTo(), ApplePictParser::checkHeader(), MWAWPictMac::checkOrGet(), MacDocParser::createZones(), ApplePictParser::drawBitmap(), ClarisWksStruct::DSET::findForbiddenPagesBreaking(), ClarisWksGraph::findMasterPage(), MWAWPictData::get(), ApplePictParserInternal::Bitmap::get(), MacDraft5StyleManagerInternal::Pixmap::get(), ApplePictParserInternal::Pixmap::get(), HanMacWrdKGraphInternal::Frame::getBdBox(), ClarisWksStruct::DSET::getBdBox(), MWAWGraphicShape::getBdBox(), ClarisWksGraphInternal::Zone::getBdBox(), ClarisWksStruct::DSET::Child::getBdBox(), ClarisDrawGraphInternal::Zone::getBdBox(), DrawTableParser::getBitmap(), CanvasGraph::getBitmap(), CanvasGraph::getBitmapBW(), MsWksGraph::getEntryPicture(), MsWksGraphInternal::Zone::getLocalBox(), MWAWGraphicShape::getPath(), MsWksGraphInternal::Zone::getPosition(), MacWrtProStructuresInternal::Graphic::getPosition(), MacWrtProStructuresInternal::Graphic::getRelativeYPos(), MWAWTableInternal::Compare::Point::getSize(), MWAWTextListener::insertShape(), MWAWGraphicListener::MWAWGraphicListener(), MWAWSpreadsheetListener::MWAWSpreadsheetListener(), MacDraftParserInternal::BitmapFileData::ok(), MWAWTableInternal::Compare::operator()(), NisusWrtTextInternal::operator<<(), BeagleWksDRParserInternal::operator<<(), MarinerWrtParserInternal::operator<<(), ClarisWksStruct::operator<<(), operator<<(), libmwaw_applepict1::Bitmap::read(), ApplePictParser::readBitmap(), MacDraftParser::readBitmapData(), ApplePictParserInternal::Bitmap::readBitmapData(), libmwaw_applepict1::Bitmap::readBitmapData(), GreatWksGraph::readFrameHeader(), MacWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MsWksDocument::readGroupHeaderFooter(), NisusWrtParser::readPageLimit(), ApplePictParser::readPixmap(), MacDraft5StyleManagerInternal::Pixmap::readPixmapData(), ApplePictParserInternal::Pixmap::readPixmapData(), SuperPaintParser::readShape(), ClarisDrawGraph::readShape(), ClarisWksGraph::readShape(), HanMacWrdJGraph::readShapeGraph(), HanMacWrdKGraph::readShapeGraph(), BeagleWksDRParser::readStyle(), libmwaw_applepict1::Bitmap::saveBitmap(), ReadySetGoParser::send(), CricketDrawParser::send(), MacDraft5Parser::send(), MacDrawParser::send(), MacDraftParser::send(), Canvas5Image::send(), ScoopParser::send(), CanvasGraph::send(), MacDrawProParser::send(), Canvas5Graph::send(), RagTime5Graph::send(), CricketDrawParser::sendAll(), CricketDrawParser::sendBitmap(), MacDrawParser::sendBitmap(), MacDraftParser::sendBitmap(), MacDrawProParser::sendBitmap(), HanMacWrdJGraph::sendComment(), CanvasGraph::sendDimension(), Canvas5Graph::sendDimension(), MWAWTable::sendExtraLines(), PowerPoint7Graph::sendFrame(), PowerPoint1Parser::sendFrame(), PowerPoint3Parser::sendFrame(), Canvas5Graph::sendGIF(), ActaText::sendGraphic(), FullWrtGraph::sendGraphic(), ClarisDrawGraph::sendGroup(), GreatWksGraph::sendGroup(), ClarisWksGraph::sendGroup(), HanMacWrdKGraph::sendGroup(), HanMacWrdJGraph::sendGroup(), GreatWksGraph::sendGroupChild(), ClarisWksGraph::sendGroupChild(), HanMacWrdKGraph::sendGroupChild(), HanMacWrdJGraph::sendGroupChild(), MsWksGraph::sendGroupChild(), ClarisDrawGraph::sendMainGroupChild(), CanvasGraph::sendMultiLines(), ClarisWksGraph::sendPageChild(), NisusWrtGraph::sendPageGraphics(), LightWayTxtGraph::sendPICT(), MacDocParser::sendPicture(), EDocParser::sendPicture(), TeachTxtParser::sendPicture(), DocMkrParser::sendPicture(), FreeHandParser::sendPicture(), WriteNowParser::sendPicture(), ClarisWksGraph::sendPicture(), HanMacWrdKGraph::sendPictureFrame(), HanMacWrdJGraph::sendPictureFrame(), BeagleWksDRParser::sendPictures(), DrawTableParser::sendShape(), FreeHandParser::sendShape(), ClarisDrawGraph::sendShape(), ClarisWksGraph::sendShape(), HanMacWrdKGraph::sendShapeGraph(), HanMacWrdJGraph::sendShapeGraph(), FullWrtGraph::sendSideBar(), CanvasGraph::sendSpecial(), Canvas5Graph::sendSpecial(), Canvas5Graph::sendTechnical(), NisusWrtText::sendText(), HanMacWrdKGraph::sendTextBox(), FreeHandParser::sendTextbox(), HanMacWrdJGraph::sendTextbox(), GreatWksGraph::sendTextboxAsGraphic(), ApplePictParserInternal::State::updatePosition(), PowerPoint7GraphInternal::FrameArc::updateShape(), PowerPoint7GraphInternal::FramePolygon::updateShape(), and PowerPoint3ParserInternal::Polygon::updateShape().
|
friend |
print data in form X0xY0<->X1xY1
the data
Referenced by MWAWBox2< int >::center(), MWAWBox2< int >::extend(), MWAWBox2< int >::getIntersection(), MWAWBox2< int >::getUnion(), MWAWBox2< int >::max(), MWAWBox2< int >::min(), MWAWBox2< int >::operator!=(), MWAWBox2< int >::operator<(), MWAWBox2< int >::operator<=(), MWAWBox2< int >::operator==(), MWAWBox2< int >::operator>(), MWAWBox2< int >::operator>=(), MWAWBox2< int >::operator[](), MWAWBox2< int >::resizeFromCenter(), MWAWBox2< int >::resizeFromMax(), MWAWBox2< int >::resizeFromMin(), MWAWBox2< int >::scale(), MWAWBox2< int >::set(), MWAWBox2< int >::setMax(), MWAWBox2< int >::setMin(), and MWAWBox2< int >::size().