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)
 
 ~Region ()
 
const basegfx::B2DPolyPolygongetB2DPolyPolygon () const
 
const tools::PolyPolygongetPolyPolygon () const
 
const RegionBandgetRegionBand () const
 
const tools::PolyPolygon GetAsPolyPolygon () const
 
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)
 
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
 

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 43 of file region.hxx.

Constructor & Destructor Documentation

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

Definition at line 310 of file region.cxx.

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

Definition at line 318 of file region.cxx.

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

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

Definition at line 327 of file region.cxx.

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

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

Definition at line 340 of file region.cxx.

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

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

Definition at line 353 of file region.cxx.

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

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

Definition at line 368 of file region.cxx.

vcl::Region::~Region ( )
default

Member Function Documentation

void vcl::Region::Exclude ( const tools::Rectangle rRegion)
void vcl::Region::Exclude ( const vcl::Region rRegion)
const basegfx::B2DPolyPolygon vcl::Region::GetAsB2DPolyPolygon ( ) const
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
inline
tools::Rectangle vcl::Region::GetBoundRect ( ) const
const tools::PolyPolygon* vcl::Region::getPolyPolygon ( ) const
inline
const RegionBand* vcl::Region::getRegionBand ( ) const
inline
vcl::Region vcl::Region::GetRegionFromPolyPolygon ( const tools::PolyPolygon rPolyPoly)
static

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
inline
basegfx::B2DPolyPolygon vcl::Region::ImplCreateB2DPolyPolygonFromRegionBand ( ) const
private

Definition at line 303 of file region.cxx.

References tools::PolyPolygon::getB2DPolyPolygon().

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

Definition at line 281 of file region.cxx.

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

void vcl::Region::ImplCreatePolyPolyRegion ( const tools::PolyPolygon rPolyPoly)
private
void vcl::Region::ImplCreatePolyPolyRegion ( const basegfx::B2DPolyPolygon rPolyPoly)
private
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
inline
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
inline

Definition at line 121 of file region.hxx.

References operator==().

Region & vcl::Region::operator= ( const vcl::Region rRegion)
default
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
friend

Definition at line 48 of file region.hxx.

friend class ::OutputDevice
friend

Definition at line 46 of file region.hxx.

friend class ::vcl::Window
friend

Definition at line 47 of file region.hxx.

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

Definition at line 1523 of file region.cxx.

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

Definition at line 1587 of file region.cxx.

Member Data Documentation

bool vcl::Region::mbIsNull
private

Definition at line 58 of file region.hxx.

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

Definition at line 52 of file region.hxx.

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

Definition at line 54 of file region.hxx.

Referenced by vcl::ReadRegion().

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

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: