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 basegfx::B2DPolyPolygongetB2DPolyPolygon () const
const tools::PolyPolygongetPolyPolygon () const
const RegionBandgetRegionBand () const
tools::PolyPolygon GetAsPolyPolygon () const
basegfx::B2DPolyPolygon GetAsB2DPolyPolygon () const
const RegionBandGetAsRegionBand () const
void Move (long nHorzMove, 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 IsInside (const Point &rPoint) const
bool IsOver (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::shared_ptr< basegfx::B2DPolyPolygonmpB2DPolyPolygon
std::shared_ptr< 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 43 of file region.hxx.

Constructor & Destructor Documentation

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

Definition at line 310 of file region.cxx.

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

Definition at line 318 of file region.cxx.

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

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

Definition at line 327 of file region.cxx.

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

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

Definition at line 340 of file region.cxx.

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

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

Definition at line 353 of file region.cxx.

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

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

Definition at line 368 of file region.cxx.

vcl::Region::~Region ( )

Member Function Documentation

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

Definition at line 1261 of file region.cxx.

Referenced by operator==(), GDIMetaFile::Rotate(), and vcl::WriteRegion().

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

Definition at line 1317 of file region.cxx.

References vcl::ImplCreateRegionBandFromPolyPolygon().

const basegfx::B2DPolyPolygon* vcl::Region::getB2DPolyPolygon ( ) const
tools::Rectangle vcl::Region::GetBoundRect ( ) const
const tools::PolyPolygon* vcl::Region::getPolyPolygon ( ) const
const RegionBand* vcl::Region::getRegionBand ( ) const
vcl::Region vcl::Region::GetRegionFromPolyPolygon ( const tools::PolyPolygon rPolyPoly)

Definition at line 1727 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 303 of file region.cxx.

References tools::PolyPolygon::getB2DPolyPolygon().

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

Definition at line 281 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::IsInside ( const Point &  rPoint) const

Definition at line 1336 of file region.cxx.

References RegionBand::IsInside().

bool vcl::Region::IsNull ( ) const
bool vcl::Region::IsOver ( const tools::Rectangle rRect) const

Definition at line 1367 of file region.cxx.

References Intersect(), and IsEmpty().

Referenced by OutputDevice::DrawText().

bool vcl::Region::IsRectangle ( ) const

Definition at line 1391 of file region.cxx.

References basegfx::utils::isRectangle().

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

Definition at line 121 of file region.hxx.

References operator==().

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

Definition at line 1428 of file region.cxx.

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

Definition at line 1439 of file region.cxx.

References tools::Rectangle::IsEmpty().

bool vcl::Region::operator== ( const vcl::Region rRegion) const
void vcl::Region::Scale ( double  fScaleX,
double  fScaleY 
void vcl::Region::SetEmpty ( )
void vcl::Region::SetNull ( )

Definition at line 1408 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 48 of file region.hxx.

friend class ::OutputDevice

Definition at line 46 of file region.hxx.

friend class ::vcl::Window

Definition at line 47 of file region.hxx.

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

Definition at line 1523 of file region.cxx.

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

Definition at line 1587 of file region.cxx.

Member Data Documentation

bool vcl::Region::mbIsNull

Definition at line 58 of file region.hxx.

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

Definition at line 52 of file region.hxx.

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

Definition at line 54 of file region.hxx.

Referenced by vcl::ReadRegion().

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

Definition at line 56 of file region.hxx.

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

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