vdr  2.2.0
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
cRect Class Reference

#include <osd.h>

Public Member Functions

 cRect (void)
 
 cRect (int X, int Y, int Width, int Height)
 
 cRect (const cPoint &Point, const cSize &Size)
 
 cRect (const cSize &Size)
 
 cRect (const cRect &Rect)
 
bool operator== (const cRect &Rect) const
 
bool operator!= (const cRect &Rect) const
 
int X (void) const
 
int Y (void) const
 
int Width (void) const
 
int Height (void) const
 
int Left (void) const
 
int Top (void) const
 
int Right (void) const
 
int Bottom (void) const
 
const cPointPoint (void) const
 
const cSizeSize (void) const
 
void Set (int X, int Y, int Width, int Height)
 
void Set (cPoint Point, cSize Size)
 
void SetPoint (int X, int Y)
 
void SetPoint (const cPoint &Point)
 
void SetSize (int Width, int Height)
 
void SetSize (const cSize &Size)
 
void SetX (int X)
 
void SetY (int Y)
 
void SetWidth (int Width)
 
void SetHeight (int Height)
 
void SetLeft (int Left)
 
void SetTop (int Top)
 
void SetRight (int Right)
 
void SetBottom (int Bottom)
 
void Shift (int Dx, int Dy)
 
void Shift (const cPoint &Dp)
 
cRect Shifted (int Dx, int Dy) const
 
cRect Shifted (const cPoint &Dp) const
 
void Grow (int Dx, int Dy)
 
cRect Grown (int Dw, int Dh) const
 
bool Contains (const cPoint &Point) const
 
bool Contains (const cRect &Rect) const
 
bool Intersects (const cRect &Rect) const
 
cRect Intersected (const cRect &Rect) const
 
void Combine (const cRect &Rect)
 
cRect Combined (const cRect &Rect) const
 
void Combine (const cPoint &Point)
 
cRect Combined (const cPoint &Point) const
 
bool IsEmpty (void) const
 

Static Public Attributes

static const cRect Null
 

Private Attributes

cPoint point
 
cSize size
 

Detailed Description

Definition at line 352 of file osd.h.

Constructor & Destructor Documentation

cRect::cRect ( void  )
inline

Definition at line 358 of file osd.h.

cRect::cRect ( int  X,
int  Y,
int  Width,
int  Height 
)
inline

Definition at line 359 of file osd.h.

cRect::cRect ( const cPoint Point,
const cSize Size 
)
inline

Definition at line 360 of file osd.h.

cRect::cRect ( const cSize Size)
inline

Definition at line 361 of file osd.h.

cRect::cRect ( const cRect Rect)
inline

Definition at line 362 of file osd.h.

Member Function Documentation

int cRect::Bottom ( void  ) const
inline
void cRect::Combine ( const cRect Rect)

Combines this rectangle with the given Rect.

Definition at line 932 of file osd.c.

References Bottom(), IsEmpty(), Left(), max(), min(), Right(), and Top().

Referenced by Combined(), and cOsd::RenderPixmaps().

void cRect::Combine ( const cPoint Point)

Combines this rectangle with the given Point.

Definition at line 945 of file osd.c.

References max(), min(), cPixmap::mutex, cPoint::X(), and cPoint::Y().

cRect cRect::Combined ( const cRect Rect) const
inline

Returns the surrounding rectangle that contains this rectangle and the given Rect.

Definition at line 407 of file osd.h.

References Combine().

cRect cRect::Combined ( const cPoint Point) const
inline

Returns the surrounding rectangle that contains this rectangle and the given Point.

Definition at line 412 of file osd.h.

References Combine().

bool cRect::Contains ( const cPoint Point) const

Returns true if this rectangle contains Point.

Definition at line 896 of file osd.c.

References cPoint::X(), and cPoint::Y().

bool cRect::Contains ( const cRect Rect) const

Returns true if this rectangle completely contains Rect.

Definition at line 904 of file osd.c.

References Bottom(), Left(), Right(), and Top().

void cRect::Grow ( int  Dx,
int  Dy 
)

Grows the rectangle by the given number of pixels in either direction.

A negative value will shrink the rectangle.

Definition at line 890 of file osd.c.

Referenced by Grown().

cRect cRect::Grown ( int  Dw,
int  Dh 
) const
inline

Definition at line 396 of file osd.h.

References Grow().

Referenced by cTrueColorDemo::Action().

int cRect::Height ( void  ) const
inline
cRect cRect::Intersected ( const cRect Rect) const
bool cRect::Intersects ( const cRect Rect) const

Returns true if this rectangle intersects with Rect.

Definition at line 912 of file osd.c.

References Bottom(), Left(), Right(), and Top().

Referenced by cOsd::RenderPixmaps().

bool cRect::IsEmpty ( void  ) const
inline
int cRect::Left ( void  ) const
inline
bool cRect::operator!= ( const cRect Rect) const
inline

Definition at line 364 of file osd.h.

bool cRect::operator== ( const cRect Rect) const
inline

Definition at line 363 of file osd.h.

References Point(), and Size().

const cPoint& cRect::Point ( void  ) const
inline
int cRect::Right ( void  ) const
inline
void cRect::Set ( int  X,
int  Y,
int  Width,
int  Height 
)
inline

Definition at line 375 of file osd.h.

References cPoint::Set(), and cSize::Set().

void cRect::Set ( cPoint  Point,
cSize  Size 
)
inline

Definition at line 376 of file osd.h.

References cPoint::Set(), and cSize::Set().

void cRect::SetBottom ( int  Bottom)
inline

Definition at line 388 of file osd.h.

Referenced by Intersected().

void cRect::SetHeight ( int  Height)
inline

Definition at line 384 of file osd.h.

References cSize::SetHeight().

void cRect::SetLeft ( int  Left)
inline

Definition at line 385 of file osd.h.

Referenced by Intersected().

void cRect::SetPoint ( int  X,
int  Y 
)
inline

Definition at line 377 of file osd.h.

References cPoint::Set().

Referenced by cTrueColorDemo::Action(), cPixmap::cPixmap(), and cPixmap::DrawPixmap().

void cRect::SetPoint ( const cPoint Point)
inline

Definition at line 378 of file osd.h.

References cPoint::Set().

void cRect::SetRight ( int  Right)
inline

Definition at line 387 of file osd.h.

Referenced by Intersected().

void cRect::SetSize ( int  Width,
int  Height 
)
inline

Definition at line 379 of file osd.h.

References cSize::Set().

void cRect::SetSize ( const cSize Size)
inline

Definition at line 380 of file osd.h.

References cSize::Set().

void cRect::SetTop ( int  Top)
inline

Definition at line 386 of file osd.h.

Referenced by Intersected().

void cRect::SetWidth ( int  Width)
inline

Definition at line 383 of file osd.h.

References cSize::SetWidth().

void cRect::SetX ( int  X)
inline

Definition at line 381 of file osd.h.

References cPoint::SetX().

void cRect::SetY ( int  Y)
inline

Definition at line 382 of file osd.h.

References cPoint::SetY().

void cRect::Shift ( int  Dx,
int  Dy 
)
inline

Definition at line 389 of file osd.h.

References cPoint::Shift().

Referenced by cPixmap::DrawPixmap(), and Shifted().

void cRect::Shift ( const cPoint Dp)
inline

Definition at line 390 of file osd.h.

References cPoint::Shift().

cRect cRect::Shifted ( int  Dx,
int  Dy 
) const
inline
cRect cRect::Shifted ( const cPoint Dp) const
inline

Definition at line 392 of file osd.h.

References Shift().

const cSize& cRect::Size ( void  ) const
inline
int cRect::Top ( void  ) const
inline
int cRect::Width ( void  ) const
inline
int cRect::X ( void  ) const
inline

Definition at line 365 of file osd.h.

References cPoint::X().

Referenced by cTrueColorDemo::Action(), and cDvbHdFfDevice::ScaleVideo().

int cRect::Y ( void  ) const
inline

Definition at line 366 of file osd.h.

References cPoint::Y().

Referenced by cTrueColorDemo::Action(), and cDvbHdFfDevice::ScaleVideo().

Member Data Documentation

const cRect cRect::Null
static
cPoint cRect::point
private

Definition at line 354 of file osd.h.

cSize cRect::size
private

Definition at line 355 of file osd.h.


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