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


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

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

Definition at line 311 of file region.cxx.

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

Definition at line 316 of file region.cxx.

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

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

Definition at line 322 of file region.cxx.

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

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

Definition at line 332 of file region.cxx.

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

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

Definition at line 342 of file region.cxx.

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

vcl::Region::Region ( const vcl::Region rRegion)
vcl::Region::Region ( vcl::Region &&  rRegion)

Definition at line 354 of file region.cxx.

vcl::Region::~Region ( )

Member Function Documentation

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

Definition at line 1343 of file region.cxx.

References RegionBand::Contains().

void vcl::Region::Exclude ( const tools::Rectangle rRegion)
void vcl::Region::Exclude ( const vcl::Region rRegion)
basegfx::B2DPolyPolygon vcl::Region::GetAsB2DPolyPolygon ( ) const
tools::PolyPolygon vcl::Region::GetAsPolyPolygon ( ) const
const RegionBand * vcl::Region::GetAsRegionBand ( ) const

Definition at line 1324 of file region.cxx.

References vcl::ImplCreateRegionBandFromPolyPolygon().

const std::optional<basegfx::B2DPolyPolygon>& vcl::Region::getB2DPolyPolygon ( ) const
tools::Rectangle vcl::Region::GetBoundRect ( ) const
const std::optional<tools::PolyPolygon>& vcl::Region::getPolyPolygon ( ) const
const RegionBand* vcl::Region::getRegionBand ( ) const
vcl::Region vcl::Region::GetRegionFromPolyPolygon ( const tools::PolyPolygon rPolyPoly)

Definition at line 1741 of file region.cxx.

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

void vcl::Region::GetRegionRectangles ( RectangleVector rTarget) const
bool vcl::Region::HasPolyPolygonOrB2DPolyPolygon ( ) const
basegfx::B2DPolyPolygon vcl::Region::ImplCreateB2DPolyPolygonFromRegionBand ( ) const

Definition at line 304 of file region.cxx.

References tools::PolyPolygon::getB2DPolyPolygon().

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

Definition at line 282 of file region.cxx.

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

void vcl::Region::ImplCreatePolyPolyRegion ( const tools::PolyPolygon rPolyPoly)
void vcl::Region::ImplCreatePolyPolyRegion ( const basegfx::B2DPolyPolygon rPolyPoly)
void vcl::Region::Intersect ( const tools::Rectangle rRegion)
void vcl::Region::Intersect ( const vcl::Region rRegion)
bool vcl::Region::IsEmpty ( ) const
bool vcl::Region::IsNull ( ) const
bool vcl::Region::IsRectangle ( ) const

Definition at line 1398 of file region.cxx.

References basegfx::utils::isRectangle().

void vcl::Region::Move ( tools::Long  nHorzMove,
tools::Long  nVertMove 
bool vcl::Region::operator!= ( const vcl::Region rRegion) const

Definition at line 118 of file region.hxx.

References operator==().

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

Definition at line 1435 of file region.cxx.

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

Definition at line 1446 of file region.cxx.

References tools::Rectangle::IsEmpty().

bool vcl::Region::operator== ( const vcl::Region rRegion) const
bool vcl::Region::Overlaps ( const tools::Rectangle rRect) const

Definition at line 1374 of file region.cxx.

References Intersect(), and IsEmpty().

Referenced by OutputDevice::DrawText().

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

Definition at line 1415 of file region.cxx.

Referenced by vcl::Window::GetWindowClipRegionPixel(), and vcl::ReadRegion().

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

Friends And Related Function Documentation

friend class ::Bitmap

Definition at line 45 of file region.hxx.

friend class ::OutputDevice

Definition at line 43 of file region.hxx.

friend class ::vcl::Window

Definition at line 44 of file region.hxx.

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

Definition at line 1530 of file region.cxx.

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

Definition at line 1601 of file region.cxx.

Member Data Documentation

bool vcl::Region::mbIsNull

Definition at line 55 of file region.hxx.

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

Definition at line 49 of file region.hxx.

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

Definition at line 51 of file region.hxx.

Referenced by vcl::ReadRegion().

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

Definition at line 53 of file region.hxx.

Referenced by vcl::ReadRegion(), and Region().

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