LibreOffice Module vcl (master) 1
|
#include <regionband.hxx>
Public Member Functions | |
RegionBand () | |
RegionBand (const RegionBand &) | |
RegionBand & | operator= (const RegionBand &) |
RegionBand (const tools::Rectangle &) | |
~RegionBand () | |
bool | operator== (const RegionBand &rRegionBand) const |
bool | load (SvStream &rIStrm) |
void | save (SvStream &rIStrm) const |
bool | isSingleRectangle () const |
ImplRegionBand * | ImplGetFirstRegionBand () const |
void | ImplAddMissingBands (const tools::Long nTop, const tools::Long nBottom) |
This function is similar to the RegionBand::InsertBands() method. More... | |
void | InsertBand (ImplRegionBand *pPreviousBand, ImplRegionBand *pBandToInsert) |
void | processPoints () |
void | CreateBandRange (tools::Long nYTop, tools::Long nYBottom) |
void | InsertLine (const Point &rStartPt, const Point &rEndPt, tools::Long nLineId) |
void | InsertPoint (const Point &rPoint, tools::Long nLineID, bool bEndPoint, LineType eLineType) |
bool | OptimizeBandList () |
void | Move (tools::Long nHorzMove, tools::Long nVertMove) |
void | Scale (double fScaleX, double fScaleY) |
void | InsertBands (tools::Long nTop, tools::Long nBottom) |
void | Union (tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom) |
void | Intersect (tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom) |
void | Union (const RegionBand &rSource) |
void | Exclude (tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom) |
void | XOr (tools::Long nLeft, tools::Long nTop, tools::Long nRight, tools::Long nBottom) |
void | Intersect (const RegionBand &rSource) |
bool | Exclude (const RegionBand &rSource) |
void | XOr (const RegionBand &rSource) |
tools::Rectangle | GetBoundRect () const |
bool | Contains (const Point &rPoint) const |
sal_uInt32 | getRectangleCount () const |
void | GetRegionRectangles (RectangleVector &rTarget) const |
Static Public Member Functions | |
static bool | InsertSingleBand (ImplRegionBand *pBand, tools::Long nYBandPosition) |
Private Member Functions | |
void | implReset () |
bool | CheckConsistency () const |
Private Attributes | |
ImplRegionBand * | mpFirstBand |
ImplRegionBand * | mpLastCheckedBand |
Friends | |
const char * | ImplDbgTestRegionBand (const void *) |
Definition at line 30 of file regionband.hxx.
RegionBand::RegionBand | ( | ) |
Definition at line 30 of file regionband.cxx.
RegionBand::RegionBand | ( | const RegionBand & | rRef | ) |
Definition at line 36 of file regionband.cxx.
RegionBand::RegionBand | ( | const tools::Rectangle & | rRect | ) |
Definition at line 71 of file regionband.cxx.
References tools::Rectangle::Bottom(), tools::Rectangle::Left(), mpFirstBand, tools::Rectangle::Right(), tools::Rectangle::Top(), and ImplRegionBand::Union().
RegionBand::~RegionBand | ( | ) |
Definition at line 103 of file regionband.cxx.
References implReset().
|
private |
Definition at line 1172 of file regionband.cxx.
References mpFirstBand, ImplRegionBand::mpFirstSep, and ImplRegionBand::mpNextBand.
Referenced by load().
bool RegionBand::Contains | ( | const Point & | rPoint | ) | const |
Definition at line 1235 of file regionband.cxx.
References ImplRegionBand::Contains(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpNextBand, Point::X(), and Point::Y().
Referenced by vcl::Region::Contains().
void RegionBand::CreateBandRange | ( | tools::Long | nYTop, |
tools::Long | nYBottom | ||
) |
Definition at line 421 of file regionband.cxx.
References i, mpFirstBand, mpLastCheckedBand, ImplRegionBand::mpNextBand, and ImplRegionBand::mpPrevBand.
bool RegionBand::Exclude | ( | const RegionBand & | rSource | ) |
Definition at line 1141 of file regionband.cxx.
References Exclude(), InsertBands(), ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, and OptimizeBandList().
void RegionBand::Exclude | ( | tools::Long | nLeft, |
tools::Long | nTop, | ||
tools::Long | nRight, | ||
tools::Long | nBottom | ||
) |
Definition at line 978 of file regionband.cxx.
References ImplRegionBand::Exclude(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpNextBand, and SAL_WARN_IF.
Referenced by Exclude(), and Intersect().
tools::Rectangle RegionBand::GetBoundRect | ( | ) | const |
Definition at line 1187 of file regionband.cxx.
References ImplRegionBand::GetXLeftBoundary(), ImplRegionBand::GetXRightBoundary(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, and ImplRegionBand::mpNextBand.
sal_uInt32 RegionBand::getRectangleCount | ( | ) | const |
Definition at line 1282 of file regionband.cxx.
References mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, and nCount.
Referenced by vcl::Region::Intersect().
void RegionBand::GetRegionRectangles | ( | RectangleVector & | rTarget | ) | const |
Definition at line 1256 of file regionband.cxx.
References ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, rTarget, tools::Rectangle::SetBottom(), tools::Rectangle::SetLeft(), tools::Rectangle::SetRight(), and tools::Rectangle::SetTop().
Referenced by vcl::Region::GetRegionRectangles().
void RegionBand::ImplAddMissingBands | ( | const tools::Long | nTop, |
const tools::Long | nBottom | ||
) |
This function is similar to the RegionBand::InsertBands() method.
It creates a minimal set of missing bands so that the entire vertical interval from nTop to nBottom is covered by bands.
Definition at line 377 of file regionband.cxx.
References ImplGetFirstRegionBand(), InsertBand(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, and ImplRegionBand::mpNextBand.
|
inline |
Definition at line 54 of file regionband.hxx.
References mpFirstBand.
Referenced by ImplAddMissingBands().
|
private |
Definition at line 88 of file regionband.cxx.
References mpFirstBand, mpLastCheckedBand, and ImplRegionBand::mpNextBand.
Referenced by load(), and ~RegionBand().
void RegionBand::InsertBand | ( | ImplRegionBand * | pPreviousBand, |
ImplRegionBand * | pBandToInsert | ||
) |
Definition at line 335 of file regionband.cxx.
References mpFirstBand, ImplRegionBand::mpNextBand, and ImplRegionBand::mpPrevBand.
Referenced by ImplAddMissingBands().
void RegionBand::InsertBands | ( | tools::Long | nTop, |
tools::Long | nBottom | ||
) |
Definition at line 719 of file regionband.cxx.
References InsertSingleBand(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, and ImplRegionBand::mpNextBand.
Referenced by Exclude(), Intersect(), Union(), and XOr().
void RegionBand::InsertLine | ( | const Point & | rStartPt, |
const Point & | rEndPt, | ||
tools::Long | nLineId | ||
) |
Definition at line 446 of file regionband.cxx.
References Ascending, Descending, InsertPoint(), Point::X(), and Point::Y().
void RegionBand::InsertPoint | ( | const Point & | rPoint, |
tools::Long | nLineID, | ||
bool | bEndPoint, | ||
LineType | eLineType | ||
) |
Definition at line 541 of file regionband.cxx.
References ImplRegionBand::InsertPoint(), ImplRegionBand::mnYTop, mpFirstBand, mpLastCheckedBand, ImplRegionBand::mpNextBand, ImplRegionBand::mpPrevBand, SAL_WARN_IF, Point::X(), and Point::Y().
Referenced by InsertLine().
|
static |
Definition at line 800 of file regionband.cxx.
References ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, and ImplRegionBand::mpNextBand.
Referenced by InsertBands().
void RegionBand::Intersect | ( | const RegionBand & | rSource | ) |
Definition at line 1060 of file regionband.cxx.
References Exclude(), InsertBands(), LONG_MAX, ImplRegionBand::mbTouched, ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, and ImplRegionBandSep::mpNextSep.
void RegionBand::Intersect | ( | tools::Long | nLeft, |
tools::Long | nTop, | ||
tools::Long | nRight, | ||
tools::Long | nBottom | ||
) |
Definition at line 918 of file regionband.cxx.
References ImplRegionBand::Intersect(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, and ImplRegionBand::mpNextBand.
bool RegionBand::isSingleRectangle | ( | ) | const |
Definition at line 320 of file regionband.cxx.
References mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, and ImplRegionBandSep::mpNextSep.
bool RegionBand::load | ( | SvStream & | rIStrm | ) |
Definition at line 204 of file regionband.cxx.
References CheckConsistency(), SvStream::eof(), SvStream::good(), implReset(), mpFirstBand, ImplRegionBand::mpNextBand, SvStream::ReadInt32(), SvStream::ReadUInt16(), SvStream::remainingSize(), and ImplRegionBand::Union().
void RegionBand::Move | ( | tools::Long | nHorzMove, |
tools::Long | nVertMove | ||
) |
Definition at line 671 of file regionband.cxx.
References ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, ImplRegionBand::MoveX(), mpFirstBand, ImplRegionBand::mpNextBand, and o3tl::saturating_add().
RegionBand & RegionBand::operator= | ( | const RegionBand & | rRef | ) |
Definition at line 43 of file regionband.cxx.
References mpFirstBand, and ImplRegionBand::mpNextBand.
bool RegionBand::operator== | ( | const RegionBand & | rRegionBand | ) | const |
Definition at line 108 of file regionband.cxx.
References ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, and ImplRegionBandSep::mpNextSep.
bool RegionBand::OptimizeBandList | ( | ) |
Definition at line 592 of file regionband.cxx.
References ImplRegionBand::IsEmpty(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, and SAL_WARN_IF.
Referenced by Exclude().
void RegionBand::processPoints | ( | ) |
Definition at line 360 of file regionband.cxx.
References mpFirstBand, ImplRegionBand::mpNextBand, and ImplRegionBand::ProcessPoints().
void RegionBand::save | ( | SvStream & | rIStrm | ) | const |
Definition at line 288 of file regionband.cxx.
References ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, SvStream::WriteInt32(), and SvStream::WriteUInt16().
void RegionBand::Scale | ( | double | fScaleX, |
double | fScaleY | ||
) |
Definition at line 695 of file regionband.cxx.
References basegfx::fround(), ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpNextBand, and ImplRegionBand::ScaleX().
void RegionBand::Union | ( | const RegionBand & | rSource | ) |
Definition at line 954 of file regionband.cxx.
References InsertBands(), ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, and Union().
void RegionBand::Union | ( | tools::Long | nLeft, |
tools::Long | nTop, | ||
tools::Long | nRight, | ||
tools::Long | nBottom | ||
) |
Definition at line 882 of file regionband.cxx.
References ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpNextBand, SAL_WARN_IF, and ImplRegionBand::Union().
Referenced by Union().
void RegionBand::XOr | ( | const RegionBand & | rSource | ) |
Definition at line 1213 of file regionband.cxx.
References InsertBands(), ImplRegionBandSep::mnXLeft, ImplRegionBandSep::mnXRight, ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpFirstSep, ImplRegionBand::mpNextBand, ImplRegionBandSep::mpNextSep, and XOr().
void RegionBand::XOr | ( | tools::Long | nLeft, |
tools::Long | nTop, | ||
tools::Long | nRight, | ||
tools::Long | nBottom | ||
) |
Definition at line 1019 of file regionband.cxx.
References ImplRegionBand::mnYBottom, ImplRegionBand::mnYTop, mpFirstBand, ImplRegionBand::mpNextBand, SAL_WARN_IF, and ImplRegionBand::XOr().
Referenced by XOr().
|
friend |
Definition at line 1304 of file regionband.cxx.
|
private |
Definition at line 35 of file regionband.hxx.
Referenced by CheckConsistency(), Contains(), CreateBandRange(), Exclude(), GetBoundRect(), getRectangleCount(), GetRegionRectangles(), ImplGetFirstRegionBand(), implReset(), InsertBand(), InsertBands(), InsertPoint(), Intersect(), isSingleRectangle(), load(), Move(), operator=(), operator==(), OptimizeBandList(), processPoints(), RegionBand(), save(), Scale(), Union(), and XOr().
|
private |
Definition at line 36 of file regionband.hxx.
Referenced by CreateBandRange(), implReset(), and InsertPoint().