LibreOffice Module vcl (master) 1
|
#include <region.hxx>
Public Member Functions | |
Region (bool bIsNull=false) | |
Region (const tools::Rectangle &rRect) | |
Region (const tools::Polygon &rPolygon) | |
Region (const tools::PolyPolygon &rPolyPoly) | |
Region (const basegfx::B2DPolyPolygon &) | |
Region (const vcl::Region &rRegion) | |
Region (vcl::Region &&rRegion) noexcept | |
~Region () | |
const std::optional< basegfx::B2DPolyPolygon > & | getB2DPolyPolygon () const |
const std::optional< tools::PolyPolygon > & | getPolyPolygon () const |
const RegionBand * | getRegionBand () const |
tools::PolyPolygon | GetAsPolyPolygon () const |
basegfx::B2DPolyPolygon | GetAsB2DPolyPolygon () const |
const RegionBand * | GetAsRegionBand () const |
void | Move (tools::Long nHorzMove, tools::Long nVertMove) |
void | Scale (double fScaleX, double fScaleY) |
void | Union (const tools::Rectangle &rRegion) |
void | Intersect (const tools::Rectangle &rRegion) |
void | Exclude (const tools::Rectangle &rRegion) |
void | XOr (const tools::Rectangle &rRegion) |
void | Union (const vcl::Region &rRegion) |
void | Intersect (const vcl::Region &rRegion) |
void | Exclude (const vcl::Region &rRegion) |
bool | XOr (const vcl::Region &rRegion) |
bool | IsEmpty () const |
bool | IsNull () const |
void | SetEmpty () |
void | SetNull () |
bool | IsRectangle () const |
tools::Rectangle | GetBoundRect () const |
bool | HasPolyPolygonOrB2DPolyPolygon () const |
void | GetRegionRectangles (RectangleVector &rTarget) const |
bool | Contains (const Point &rPoint) const |
bool | Overlaps (const tools::Rectangle &rRect) const |
vcl::Region & | operator= (const vcl::Region &rRegion) |
vcl::Region & | operator= (vcl::Region &&rRegion) noexcept |
vcl::Region & | operator= (const tools::Rectangle &rRect) |
bool | operator== (const vcl::Region &rRegion) const |
bool | operator!= (const vcl::Region &rRegion) const |
Static Public Member Functions | |
static vcl::Region | GetRegionFromPolyPolygon (const tools::PolyPolygon &rPolyPoly) |
Private Member Functions | |
SAL_DLLPRIVATE void | ImplCreatePolyPolyRegion (const tools::PolyPolygon &rPolyPoly) |
SAL_DLLPRIVATE void | ImplCreatePolyPolyRegion (const basegfx::B2DPolyPolygon &rPolyPoly) |
SAL_DLLPRIVATE tools::PolyPolygon | ImplCreatePolyPolygonFromRegionBand () const |
SAL_DLLPRIVATE basegfx::B2DPolyPolygon | ImplCreateB2DPolyPolygonFromRegionBand () const |
Private Attributes | |
std::optional< basegfx::B2DPolyPolygon > | mpB2DPolyPolygon |
std::optional< tools::PolyPolygon > | mpPolyPolygon |
std::shared_ptr< RegionBand > | mpRegionBand |
bool | mbIsNull: 1 |
Friends | |
class | ::OutputDevice |
class | ::vcl::Window |
class | ::Bitmap |
VCL_DLLPUBLIC SvStream & | ReadRegion (SvStream &rIStm, vcl::Region &rRegion) |
VCL_DLLPUBLIC SvStream & | WriteRegion (SvStream &rOStm, const vcl::Region &rRegion) |
Definition at line 40 of file region.hxx.
|
explicit |
Definition at line 311 of file region.cxx.
|
explicit |
Definition at line 316 of file region.cxx.
References tools::Rectangle::IsEmpty(), and mpRegionBand.
|
explicit |
Definition at line 323 of file region.cxx.
References tools::Polygon::GetSize(), and ImplCreatePolyPolyRegion().
|
explicit |
Definition at line 333 of file region.cxx.
References tools::PolyPolygon::Count(), and ImplCreatePolyPolyRegion().
|
explicit |
Definition at line 343 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), and ImplCreatePolyPolyRegion().
|
default |
|
noexcept |
Definition at line 355 of file region.cxx.
|
default |
bool vcl::Region::Contains | ( | const Point & | rPoint | ) | const |
Definition at line 1341 of file region.cxx.
References RegionBand::Contains().
void vcl::Region::Exclude | ( | const tools::Rectangle & | rRegion | ) |
Definition at line 680 of file region.cxx.
References vcl::unotools::b2DRectangleFromRectangle(), tools::Rectangle::Bottom(), basegfx::B2DPolyPolygon::count(), basegfx::utils::createPolygonFromRect(), tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), basegfx::utils::prepareForPolygonOperation(), tools::Rectangle::Right(), basegfx::utils::solvePolygonOperationDiff(), and tools::Rectangle::Top().
Referenced by ImplStdBorderWindowView::DrawWindow(), vcl::Window::ImplCalcOverlapRegion(), vcl::Window::ImplExcludeWindowRegion(), vcl::Window::ImplPosSizeWindow(), vcl::Window::ImplScroll(), and ImplBorderWindow::InvalidateBorder().
void vcl::Region::Exclude | ( | const vcl::Region & | rRegion | ) |
Definition at line 1047 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), GetAsB2DPolyPolygon(), getRegionBand(), HasPolyPolygonOrB2DPolyPolygon(), IsEmpty(), IsNull(), basegfx::utils::prepareForPolygonOperation(), and basegfx::utils::solvePolygonOperationDiff().
basegfx::B2DPolyPolygon vcl::Region::GetAsB2DPolyPolygon | ( | ) | const |
Definition at line 1294 of file region.cxx.
Referenced by clipMetafileContentAgainstOwnRegions(), Exclude(), SvmWriter::GetChecksum(), Intersect(), SalGraphics::mirror(), operator==(), vcl::PDFWriterImpl::playMetafile(), Union(), and XOr().
tools::PolyPolygon vcl::Region::GetAsPolyPolygon | ( | ) | const |
Definition at line 1266 of file region.cxx.
Referenced by operator==(), GDIMetaFile::Rotate(), and MetafileXmlDump::writeXml().
const RegionBand * vcl::Region::GetAsRegionBand | ( | ) | const |
Definition at line 1322 of file region.cxx.
References vcl::ImplCreateRegionBandFromPolyPolygon().
|
inline |
Definition at line 76 of file region.hxx.
Referenced by Intersect(), OutputDevice::LogicToPixel(), operator==(), and OutputDevice::PixelToLogic().
tools::Rectangle vcl::Region::GetBoundRect | ( | ) | const |
Definition at line 1219 of file region.cxx.
References basegfx::fround(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), basegfx::utils::getRange(), and basegfx::Range2D< typename TYPE, typename TRAITS >::isEmpty().
Referenced by vcl::WindowOutputDevice::ClipToPaintRegion(), MetaISectRegionClipRegionAction::Execute(), GDIMetaFile::GetBoundRect(), ToolBox::ImplDrawConstantBackground(), Edit::ImplPaintBorder(), vcl::Window::Invalidate(), ScrollBar::PreNotify(), vcl::Window::PushPaintHelper(), vcl::Window::Show(), and MetafileXmlDump::writeXml().
|
inline |
Definition at line 77 of file region.hxx.
Referenced by Intersect(), OutputDevice::LogicToPixel(), operator==(), and OutputDevice::PixelToLogic().
|
inline |
Definition at line 78 of file region.hxx.
Referenced by Exclude(), Intersect(), OutputDevice::LogicToPixel(), operator==(), OutputDevice::PixelToLogic(), Union(), and XOr().
|
static |
Definition at line 1742 of file region.cxx.
References tools::PolyPolygon::Count(), i, vcl::ImplPolygonRectTest(), and XOr().
void vcl::Region::GetRegionRectangles | ( | RectangleVector & | rTarget | ) | const |
Definition at line 1674 of file region.cxx.
References RegionBand::GetRegionRectangles(), and rTarget.
Referenced by Printer::DrawDeviceMask(), vcl::Window::ImplSysObjClip(), OutputDevice::LogicToPixel(), SalGraphics::mirror(), OutputDevice::PixelToLogic(), and OutputDevice::ReMirror().
|
inline |
Definition at line 107 of file region.hxx.
Referenced by Exclude(), SvmWriter::GetChecksum(), Intersect(), SalGraphics::mirror(), GDIMetaFile::Rotate(), Union(), MetafileXmlDump::writeXml(), and XOr().
|
private |
Definition at line 304 of file region.cxx.
References tools::PolyPolygon::getB2DPolyPolygon().
|
private |
Definition at line 282 of file region.cxx.
References tools::PolyPolygon::Insert(), and rectangle().
|
private |
Definition at line 392 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), basegfx::B2DPolyPolygon::getB2DRange(), and basegfx::Range2D< typename TYPE, typename TRAITS >::isEmpty().
|
private |
Definition at line 366 of file region.cxx.
References tools::PolyPolygon::Count(), tools::PolyPolygon::GetBoundRect(), tools::Rectangle::GetHeight(), tools::Rectangle::GetWidth(), tools::Rectangle::IsEmpty(), and tools::PolyPolygon::IsRect().
Referenced by Region().
void vcl::Region::Intersect | ( | const tools::Rectangle & | rRegion | ) |
Definition at line 583 of file region.cxx.
References tools::Rectangle::Bottom(), tools::PolyPolygon::Clip(), basegfx::utils::clipPolyPolygonOnRange(), basegfx::B2DPolyPolygon::count(), tools::PolyPolygon::Count(), tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), tools::Rectangle::Right(), and tools::Rectangle::Top().
Referenced by GDIMetaFile::Clip(), OutputDevice::ClipToDeviceBounds(), PaintHelper::DoPaint(), OutputDevice::DrawText(), vcl::Window::ExpandPaintClipRegion(), vcl::WindowOutputDevice::GetActiveClipRegion(), vcl::WindowOutputDevice::GetOutputBoundsClipRegion(), vcl::Window::ImplCalcOverlapRegion(), vcl::Window::ImplClipBoundaries(), SVMConverter::ImplConvertFromSVM1(), ToolBox::ImplDrawBackground(), vcl::Window::ImplExcludeWindowRegion(), vcl::Window::ImplIntersectWindowClipRegion(), vcl::Window::ImplIntersectWindowRegion(), vcl::Window::ImplInvalidate(), vcl::Window::ImplMoveInvalidateRegion(), vcl::Window::ImplPaintToDevice(), vcl::Window::ImplPosSizeWindow(), Edit::ImplRepaint(), vcl::Window::ImplScroll(), vcl::Window::ImplSysObjClip(), vcl::WindowOutputDevice::InitClipRegion(), Intersect(), OutputDevice::IntersectClipRegion(), lcl_canPaint(), Overlaps(), and vcl::WindowOutputDevice::SaveBackground().
void vcl::Region::Intersect | ( | const vcl::Region & | rRegion | ) |
Definition at line 925 of file region.cxx.
References basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::B2DPolyPolygon::count(), GetAsB2DPolyPolygon(), getB2DPolyPolygon(), getPolyPolygon(), RegionBand::getRectangleCount(), getRegionBand(), HasPolyPolygonOrB2DPolyPolygon(), Intersect(), IsEmpty(), utl::ConfigManager::IsFuzzing(), and IsNull().
bool vcl::Region::IsEmpty | ( | ) | const |
Definition at line 229 of file region.cxx.
Referenced by clipMetafileContentAgainstOwnRegions(), PaintHelper::DoPaint(), Exclude(), vcl::Window::ExpandPaintClipRegion(), vcl::Window::ImplCalcToTop(), vcl::Window::ImplClipBoundaries(), vcl::Window::ImplInvalidate(), vcl::Window::ImplInvalidateOverlapFrameRegion(), vcl::Window::ImplMoveAllInvalidateRegions(), vcl::Window::ImplPosSizeWindow(), Edit::ImplRepaint(), vcl::Window::ImplScroll(), vcl::Window::ImplSysObjClip(), vcl::Window::ImplValidate(), OutputDevice::InitClipRegion(), vcl::WindowOutputDevice::InitClipRegion(), Intersect(), vcl::Window::Invalidate(), lcl_canPaint(), OutputDevice::LogicToPixel(), operator==(), Overlaps(), OutputDevice::PixelToLogic(), vcl::PDFWriterImpl::playMetafile(), TabControl::PreNotify(), vcl::WindowOutputDevice::SaveBackground(), vcl::Window::SetWindowRegionPixel(), vcl::Window::Show(), Union(), and XOr().
|
inline |
Definition at line 99 of file region.hxx.
Referenced by vcl::WindowOutputDevice::ClipToPaintRegion(), AnimationRenderer::draw(), OutputDevice::DrawText(), AnimationRenderer::drawToIndex(), Exclude(), Edit::ImplPaintBorder(), Intersect(), OutputDevice::IntersectClipRegion(), vcl::Window::Invalidate(), OutputDevice::LogicToPixel(), operator==(), OutputDevice::PixelToLogic(), OutputDevice::SetClipRegion(), vcl::Window::SetWindowRegionPixel(), Union(), and XOr().
bool vcl::Region::IsRectangle | ( | ) | const |
Definition at line 1396 of file region.cxx.
References basegfx::utils::isRectangle().
void vcl::Region::Move | ( | tools::Long | nHorzMove, |
tools::Long | nVertMove | ||
) |
Definition at line 401 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), tools::PolyPolygon::Count(), basegfx::utils::createTranslateB2DHomMatrix(), tools::PolyPolygon::Move(), and basegfx::B2DPolyPolygon::transform().
Referenced by vcl::WindowOutputDevice::GetActiveClipRegion(), vcl::Window::GetPaintRegion(), vcl::Window::GetWindowClipRegionPixel(), vcl::Window::ImplMoveAllInvalidateRegions(), vcl::Window::ImplMoveInvalidateRegion(), Edit::ImplPaintBorder(), OutputDevice::ImplPixelToDevicePixel(), vcl::Window::ImplScroll(), vcl::Window::ImplSysObjClip(), Slider::ImplUpdateRects(), MetaClipRegionAction::Move(), MetaISectRegionClipRegionAction::Move(), OutputDevice::MoveClipRegion(), and vcl::WindowOutputDevice::SaveBackground().
|
inline |
Definition at line 118 of file region.hxx.
References operator==().
Region & vcl::Region::operator= | ( | const tools::Rectangle & | rRect | ) |
Definition at line 1444 of file region.cxx.
References tools::Rectangle::IsEmpty().
|
default |
|
noexcept |
Definition at line 1433 of file region.cxx.
bool vcl::Region::operator== | ( | const vcl::Region & | rRegion | ) | const |
Definition at line 1457 of file region.cxx.
References GetAsB2DPolyPolygon(), GetAsPolyPolygon(), getB2DPolyPolygon(), getPolyPolygon(), getRegionBand(), IsEmpty(), and IsNull().
Referenced by operator!=().
bool vcl::Region::Overlaps | ( | const tools::Rectangle & | rRect | ) | const |
Definition at line 1372 of file region.cxx.
References Intersect(), and IsEmpty().
Referenced by OutputDevice::DrawText().
void vcl::Region::Scale | ( | double | fScaleX, |
double | fScaleY | ||
) |
Definition at line 454 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), tools::PolyPolygon::Count(), basegfx::utils::createScaleB2DHomMatrix(), basegfx::fTools::equalZero(), tools::PolyPolygon::Scale(), and basegfx::B2DPolyPolygon::transform().
Referenced by MetaClipRegionAction::Scale(), and MetaISectRegionClipRegionAction::Scale().
void vcl::Region::SetEmpty | ( | ) |
Definition at line 1422 of file region.cxx.
Referenced by vcl::Window::ImplMoveAllInvalidateRegions(), and SalGraphics::mirror().
void vcl::Region::SetNull | ( | ) |
Definition at line 1413 of file region.cxx.
Referenced by vcl::Window::GetWindowClipRegionPixel().
void vcl::Region::Union | ( | const tools::Rectangle & | rRegion | ) |
Definition at line 507 of file region.cxx.
References vcl::unotools::b2DRectangleFromRectangle(), tools::Rectangle::Bottom(), basegfx::B2DPolyPolygon::count(), basegfx::utils::createPolygonFromRect(), tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), basegfx::utils::prepareForPolygonOperation(), tools::Rectangle::Right(), basegfx::utils::solvePolygonOperationOr(), and tools::Rectangle::Top().
Referenced by Bitmap::CreateRegion(), PaintHelper::DoPaint(), vcl::Window::ImplCalcOverlapRegion(), vcl::Window::ImplIntersectAndUnionOverlapWindows(), vcl::Window::ImplIntersectAndUnionOverlapWindows2(), vcl::Window::ImplMoveAllInvalidateRegions(), Edit::ImplRepaint(), vcl::Window::ImplScroll(), Slider::ImplUpdateRects(), OutputDevice::LogicToPixel(), SalGraphics::mirror(), OutputDevice::PixelToLogic(), TabControl::PreNotify(), ScrollBar::PreNotify(), OutputDevice::ReMirror(), and BubbleWindow::Resize().
void vcl::Region::Union | ( | const vcl::Region & | rRegion | ) |
Definition at line 839 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), GetAsB2DPolyPolygon(), getRegionBand(), HasPolyPolygonOrB2DPolyPolygon(), IsEmpty(), IsNull(), basegfx::utils::prepareForPolygonOperation(), and basegfx::utils::solvePolygonOperationOr().
void vcl::Region::XOr | ( | const tools::Rectangle & | rRegion | ) |
Definition at line 756 of file region.cxx.
References vcl::unotools::b2DRectangleFromRectangle(), tools::Rectangle::Bottom(), basegfx::B2DPolyPolygon::count(), basegfx::utils::createPolygonFromRect(), tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), basegfx::utils::prepareForPolygonOperation(), tools::Rectangle::Right(), basegfx::utils::solvePolygonOperationXor(), and tools::Rectangle::Top().
Referenced by GetRegionFromPolyPolygon().
bool vcl::Region::XOr | ( | const vcl::Region & | rRegion | ) |
Definition at line 1130 of file region.cxx.
References basegfx::B2DPolyPolygon::count(), GetAsB2DPolyPolygon(), getRegionBand(), HasPolyPolygonOrB2DPolyPolygon(), IsEmpty(), IsNull(), basegfx::utils::prepareForPolygonOperation(), and basegfx::utils::solvePolygonOperationXor().
|
friend |
Definition at line 45 of file region.hxx.
|
friend |
Definition at line 43 of file region.hxx.
|
friend |
Definition at line 44 of file region.hxx.
|
friend |
Definition at line 1531 of file region.cxx.
|
friend |
Definition at line 1602 of file region.cxx.
|
private |
Definition at line 55 of file region.hxx.
|
private |
Definition at line 49 of file region.hxx.
|
private |
Definition at line 51 of file region.hxx.
|
private |
Definition at line 53 of file region.hxx.
Referenced by Region().