vdr 2.7.3
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() [1/5]

cRect::cRect ( void )
inline

Definition at line 358 of file osd.h.

References point, and size.

Referenced by Combine(), Combined(), Combined(), Contains(), cRect(), Grown(), Intersected(), Intersects(), operator!=(), operator==(), Shifted(), and Shifted().

◆ cRect() [2/5]

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

Definition at line 359 of file osd.h.

References Height(), point, size, Width(), X(), and Y().

◆ cRect() [3/5]

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

Definition at line 360 of file osd.h.

References Point(), point, Size(), and size.

◆ cRect() [4/5]

cRect::cRect ( const cSize & Size)
inline

Definition at line 361 of file osd.h.

References point, Size(), and size.

◆ cRect() [5/5]

cRect::cRect ( const cRect & Rect)
inline

Definition at line 362 of file osd.h.

References cRect(), Point(), point, Size(), and size.

Member Function Documentation

◆ Bottom()

int cRect::Bottom ( void ) const
inline

◆ Combine() [1/2]

void cRect::Combine ( const cPoint & Point)

Combines this rectangle with the given Point.

Definition at line 947 of file osd.c.

References Bottom(), IsEmpty(), Left(), max(), min(), Point(), Right(), Set(), SetBottom(), SetLeft(), SetRight(), SetTop(), and Top().

◆ Combine() [2/2]

void cRect::Combine ( const cRect & Rect)

Combines this rectangle with the given Rect.

Definition at line 934 of file osd.c.

References Bottom(), cRect(), IsEmpty(), Left(), max(), min(), Right(), SetBottom(), SetLeft(), SetRight(), SetTop(), and Top().

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

◆ Combined() [1/2]

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(), cRect(), and Point().

◆ Combined() [2/2]

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(), and cRect().

◆ Contains() [1/2]

bool cRect::Contains ( const cPoint & Point) const

Returns true if this rectangle contains Point.

Definition at line 898 of file osd.c.

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

◆ Contains() [2/2]

bool cRect::Contains ( const cRect & Rect) const

Returns true if this rectangle completely contains Rect.

Definition at line 906 of file osd.c.

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

◆ Grow()

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 892 of file osd.c.

References point, and size.

Referenced by Grown().

◆ Grown()

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

Definition at line 396 of file osd.h.

References cRect(), and Grow().

Referenced by cTrueColorDemo::Action().

◆ Height()

◆ Intersected()

◆ Intersects()

bool cRect::Intersects ( const cRect & Rect) const

Returns true if this rectangle intersects with Rect.

Definition at line 914 of file osd.c.

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

Referenced by cOsd::RenderPixmaps().

◆ IsEmpty()

bool cRect::IsEmpty ( void ) const
inline

◆ Left()

◆ operator!=()

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

Definition at line 364 of file osd.h.

References cRect().

◆ operator==()

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

Definition at line 363 of file osd.h.

References cRect(), Point(), point, Size(), and size.

◆ Point()

◆ Right()

int cRect::Right ( void ) const
inline

◆ Set() [1/2]

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

Definition at line 376 of file osd.h.

References Point(), point, Size(), and size.

◆ Set() [2/2]

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

Definition at line 375 of file osd.h.

References Height(), point, size, Width(), X(), and Y().

Referenced by Combine().

◆ SetBottom()

void cRect::SetBottom ( int Bottom)
inline

Definition at line 388 of file osd.h.

References Bottom(), SetHeight(), and Y().

Referenced by Combine(), Combine(), and Intersected().

◆ SetHeight()

void cRect::SetHeight ( int Height)
inline

Definition at line 384 of file osd.h.

References Height(), and size.

Referenced by SetBottom(), and SetTop().

◆ SetLeft()

void cRect::SetLeft ( int Left)
inline

Definition at line 385 of file osd.h.

References Left(), SetWidth(), SetX(), Width(), and X().

Referenced by Combine(), Combine(), and Intersected().

◆ SetPoint() [1/2]

void cRect::SetPoint ( const cPoint & Point)
inline

Definition at line 378 of file osd.h.

References Point(), and point.

◆ SetPoint() [2/2]

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

Definition at line 377 of file osd.h.

References point, X(), and Y().

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

◆ SetRight()

void cRect::SetRight ( int Right)
inline

Definition at line 387 of file osd.h.

References Right(), SetWidth(), and X().

Referenced by Combine(), Combine(), and Intersected().

◆ SetSize() [1/2]

void cRect::SetSize ( const cSize & Size)
inline

Definition at line 380 of file osd.h.

References Size(), and size.

◆ SetSize() [2/2]

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

Definition at line 379 of file osd.h.

References Height(), size, and Width().

◆ SetTop()

void cRect::SetTop ( int Top)
inline

Definition at line 386 of file osd.h.

References Height(), SetHeight(), SetY(), Top(), and Y().

Referenced by Combine(), Combine(), and Intersected().

◆ SetWidth()

void cRect::SetWidth ( int Width)
inline

Definition at line 383 of file osd.h.

References size, and Width().

Referenced by SetLeft(), and SetRight().

◆ SetX()

void cRect::SetX ( int X)
inline

Definition at line 381 of file osd.h.

References point, and X().

Referenced by SetLeft().

◆ SetY()

void cRect::SetY ( int Y)
inline

Definition at line 382 of file osd.h.

References point, and Y().

Referenced by SetTop().

◆ Shift() [1/2]

void cRect::Shift ( const cPoint & Dp)
inline

Definition at line 390 of file osd.h.

References point.

◆ Shift() [2/2]

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

Definition at line 389 of file osd.h.

References point.

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

◆ Shifted() [1/2]

cRect cRect::Shifted ( const cPoint & Dp) const
inline

Definition at line 392 of file osd.h.

References cRect(), and Shift().

◆ Shifted() [2/2]

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

◆ Size()

const cSize & cRect::Size ( void ) const
inline

Definition at line 374 of file osd.h.

References size.

Referenced by cRect(), cRect(), cRect(), cPixmap::DrawPixmap(), operator==(), cPixmapMemory::Render(), Set(), and SetSize().

◆ Top()

◆ Width()

◆ X()

int cRect::X ( void ) const
inline

◆ Y()

int cRect::Y ( void ) const
inline

Member Data Documentation

◆ Null

◆ point

cPoint cRect::point
private

◆ size

cSize cRect::size
private

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