LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
vcl::Region Class Reference

#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 RegionBandgetRegionBand () const
 
tools::PolyPolygon GetAsPolyPolygon () const
 
basegfx::B2DPolyPolygon GetAsB2DPolyPolygon () const
 
const RegionBandGetAsRegionBand () 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::Regionoperator= (const vcl::Region &rRegion)
 
vcl::Regionoperator= (vcl::Region &&rRegion) noexcept
 
vcl::Regionoperator= (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::B2DPolyPolygonmpB2DPolyPolygon
 
std::optional< tools::PolyPolygonmpPolyPolygon
 
std::shared_ptr< RegionBandmpRegionBand
 
bool mbIsNull: 1
 

Friends

class ::OutputDevice
 
class ::vcl::Window
 
class ::Bitmap
 
VCL_DLLPUBLIC SvStreamReadRegion (SvStream &rIStm, vcl::Region &rRegion)
 
VCL_DLLPUBLIC SvStreamWriteRegion (SvStream &rOStm, const vcl::Region &rRegion)
 

Detailed Description

Definition at line 40 of file region.hxx.

Constructor & Destructor Documentation

◆ Region() [1/7]

vcl::Region::Region ( bool  bIsNull = false)
explicit

Definition at line 311 of file region.cxx.

◆ Region() [2/7]

vcl::Region::Region ( const tools::Rectangle rRect)
explicit

Definition at line 316 of file region.cxx.

References tools::Rectangle::IsEmpty(), and mpRegionBand.

◆ Region() [3/7]

vcl::Region::Region ( const tools::Polygon rPolygon)
explicit

Definition at line 323 of file region.cxx.

References tools::Polygon::GetSize(), and ImplCreatePolyPolyRegion().

◆ Region() [4/7]

vcl::Region::Region ( const tools::PolyPolygon rPolyPoly)
explicit

Definition at line 333 of file region.cxx.

References tools::PolyPolygon::Count(), and ImplCreatePolyPolyRegion().

◆ Region() [5/7]

vcl::Region::Region ( const basegfx::B2DPolyPolygon rPolyPoly)
explicit

Definition at line 343 of file region.cxx.

References basegfx::B2DPolyPolygon::count(), and ImplCreatePolyPolyRegion().

◆ Region() [6/7]

vcl::Region::Region ( const vcl::Region rRegion)
default

◆ Region() [7/7]

vcl::Region::Region ( vcl::Region &&  rRegion)
noexcept

Definition at line 355 of file region.cxx.

◆ ~Region()

vcl::Region::~Region ( )
default

Member Function Documentation

◆ Contains()

bool vcl::Region::Contains ( const Point rPoint) const

Definition at line 1341 of file region.cxx.

References RegionBand::Contains().

◆ Exclude() [1/2]

void vcl::Region::Exclude ( const tools::Rectangle rRegion)

◆ Exclude() [2/2]

void vcl::Region::Exclude ( const vcl::Region rRegion)

◆ GetAsB2DPolyPolygon()

basegfx::B2DPolyPolygon vcl::Region::GetAsB2DPolyPolygon ( ) const

◆ GetAsPolyPolygon()

tools::PolyPolygon vcl::Region::GetAsPolyPolygon ( ) const

Definition at line 1266 of file region.cxx.

Referenced by operator==(), GDIMetaFile::Rotate(), and MetafileXmlDump::writeXml().

◆ GetAsRegionBand()

const RegionBand * vcl::Region::GetAsRegionBand ( ) const

Definition at line 1322 of file region.cxx.

References vcl::ImplCreateRegionBandFromPolyPolygon().

◆ getB2DPolyPolygon()

const std::optional< basegfx::B2DPolyPolygon > & vcl::Region::getB2DPolyPolygon ( ) const
inline

◆ GetBoundRect()

tools::Rectangle vcl::Region::GetBoundRect ( ) const

◆ getPolyPolygon()

const std::optional< tools::PolyPolygon > & vcl::Region::getPolyPolygon ( ) const
inline

◆ getRegionBand()

const RegionBand * vcl::Region::getRegionBand ( ) const
inline

◆ GetRegionFromPolyPolygon()

vcl::Region vcl::Region::GetRegionFromPolyPolygon ( const tools::PolyPolygon rPolyPoly)
static

Definition at line 1742 of file region.cxx.

References tools::PolyPolygon::Count(), i, vcl::ImplPolygonRectTest(), and XOr().

◆ GetRegionRectangles()

void vcl::Region::GetRegionRectangles ( RectangleVector rTarget) const

◆ HasPolyPolygonOrB2DPolyPolygon()

bool vcl::Region::HasPolyPolygonOrB2DPolyPolygon ( ) const
inline

◆ ImplCreateB2DPolyPolygonFromRegionBand()

basegfx::B2DPolyPolygon vcl::Region::ImplCreateB2DPolyPolygonFromRegionBand ( ) const
private

Definition at line 304 of file region.cxx.

References tools::PolyPolygon::getB2DPolyPolygon().

◆ ImplCreatePolyPolygonFromRegionBand()

tools::PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand ( ) const
private

Definition at line 282 of file region.cxx.

References tools::PolyPolygon::Insert(), and rectangle().

◆ ImplCreatePolyPolyRegion() [1/2]

void vcl::Region::ImplCreatePolyPolyRegion ( const basegfx::B2DPolyPolygon rPolyPoly)
private

◆ ImplCreatePolyPolyRegion() [2/2]

void vcl::Region::ImplCreatePolyPolyRegion ( const tools::PolyPolygon rPolyPoly)
private

◆ Intersect() [1/2]

void vcl::Region::Intersect ( const tools::Rectangle rRegion)

◆ Intersect() [2/2]

void vcl::Region::Intersect ( const vcl::Region rRegion)

◆ IsEmpty()

bool vcl::Region::IsEmpty ( ) const

◆ IsNull()

bool vcl::Region::IsNull ( ) const
inline

◆ IsRectangle()

bool vcl::Region::IsRectangle ( ) const

Definition at line 1396 of file region.cxx.

References basegfx::utils::isRectangle().

◆ Move()

void vcl::Region::Move ( tools::Long  nHorzMove,
tools::Long  nVertMove 
)

◆ operator!=()

bool vcl::Region::operator!= ( const vcl::Region rRegion) const
inline

Definition at line 118 of file region.hxx.

References operator==().

◆ operator=() [1/3]

Region & vcl::Region::operator= ( const tools::Rectangle rRect)

Definition at line 1444 of file region.cxx.

References tools::Rectangle::IsEmpty().

◆ operator=() [2/3]

Region & vcl::Region::operator= ( const vcl::Region rRegion)
default

◆ operator=() [3/3]

Region & vcl::Region::operator= ( vcl::Region &&  rRegion)
noexcept

Definition at line 1433 of file region.cxx.

◆ operator==()

bool vcl::Region::operator== ( const vcl::Region rRegion) const

◆ Overlaps()

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

◆ Scale()

void vcl::Region::Scale ( double  fScaleX,
double  fScaleY 
)

◆ SetEmpty()

void vcl::Region::SetEmpty ( )

Definition at line 1422 of file region.cxx.

Referenced by vcl::Window::ImplMoveAllInvalidateRegions(), and SalGraphics::mirror().

◆ SetNull()

void vcl::Region::SetNull ( )

Definition at line 1413 of file region.cxx.

Referenced by vcl::Window::GetWindowClipRegionPixel().

◆ Union() [1/2]

void vcl::Region::Union ( const tools::Rectangle rRegion)

◆ Union() [2/2]

void vcl::Region::Union ( const vcl::Region rRegion)

◆ XOr() [1/2]

void vcl::Region::XOr ( const tools::Rectangle rRegion)

◆ XOr() [2/2]

bool vcl::Region::XOr ( const vcl::Region rRegion)

Friends And Related Function Documentation

◆ ::Bitmap

friend class ::Bitmap
friend

Definition at line 45 of file region.hxx.

◆ ::OutputDevice

friend class ::OutputDevice
friend

Definition at line 43 of file region.hxx.

◆ ::vcl::Window

friend class ::vcl::Window
friend

Definition at line 44 of file region.hxx.

◆ ReadRegion

VCL_DLLPUBLIC SvStream & ReadRegion ( SvStream rIStm,
vcl::Region rRegion 
)
friend

Definition at line 1531 of file region.cxx.

◆ WriteRegion

VCL_DLLPUBLIC SvStream & WriteRegion ( SvStream rOStm,
const vcl::Region rRegion 
)
friend

Definition at line 1602 of file region.cxx.

Member Data Documentation

◆ mbIsNull

bool vcl::Region::mbIsNull
private

Definition at line 55 of file region.hxx.

◆ mpB2DPolyPolygon

std::optional< basegfx::B2DPolyPolygon > vcl::Region::mpB2DPolyPolygon
private

Definition at line 49 of file region.hxx.

◆ mpPolyPolygon

std::optional< tools::PolyPolygon > vcl::Region::mpPolyPolygon
private

Definition at line 51 of file region.hxx.

◆ mpRegionBand

std::shared_ptr< RegionBand > vcl::Region::mpRegionBand
private

Definition at line 53 of file region.hxx.

Referenced by Region().


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