vdr 2.6.1
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
 
 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 include/vdr/osd.h.

Constructor & Destructor Documentation

◆ cRect() [1/10]

cRect::cRect ( void  )
inline

Definition at line 358 of file include/vdr/osd.h.

◆ cRect() [2/10]

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

Definition at line 359 of file include/vdr/osd.h.

◆ cRect() [3/10]

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

Definition at line 360 of file include/vdr/osd.h.

◆ cRect() [4/10]

cRect::cRect ( const cSize Size)
inline

Definition at line 361 of file include/vdr/osd.h.

◆ cRect() [5/10]

cRect::cRect ( const cRect Rect)
inline

Definition at line 362 of file include/vdr/osd.h.

◆ cRect() [6/10]

cRect::cRect ( void  )
inline

Definition at line 358 of file osd.h.

◆ cRect() [7/10]

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

Definition at line 359 of file osd.h.

◆ cRect() [8/10]

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

Definition at line 360 of file osd.h.

◆ cRect() [9/10]

cRect::cRect ( const cSize Size)
inline

Definition at line 361 of file osd.h.

◆ cRect() [10/10]

cRect::cRect ( const cRect Rect)
inline

Definition at line 362 of file osd.h.

Member Function Documentation

◆ Bottom() [1/2]

int cRect::Bottom ( void  ) const
inline

◆ Bottom() [2/2]

int cRect::Bottom ( void  ) const
inline

Definition at line 372 of file osd.h.

References Height(), and Y().

◆ Combine() [1/4]

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(), Top(), cPoint::X(), and cPoint::Y().

◆ Combine() [2/4]

void cRect::Combine ( const cPoint Point)

Combines this rectangle with the given Point.

◆ Combine() [3/4]

void cRect::Combine ( const cRect Rect)

Combines this rectangle with the given Rect.

Definition at line 934 of file osd.c.

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

Referenced by Combined(), cPixmap::MarkDrawPortDirty(), cPixmap::MarkViewPortDirty(), and cOsd::RenderPixmaps().

◆ Combine() [4/4]

void cRect::Combine ( const cRect Rect)

Combines this rectangle with the given Rect.

◆ Combined() [1/4]

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 include/vdr/osd.h.

References Combine(), and Point().

◆ Combined() [2/4]

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

◆ Combined() [3/4]

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 include/vdr/osd.h.

References Combine().

◆ Combined() [4/4]

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().

◆ Contains() [1/4]

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(), Top(), cPoint::X(), and cPoint::Y().

Referenced by cPixmap::MarkDrawPortDirty(), and cPixmap::MarkViewPortDirty().

◆ Contains() [2/4]

bool cRect::Contains ( const cPoint Point) const

Returns true if this rectangle contains Point.

◆ Contains() [3/4]

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(), Left(), Right(), and Top().

◆ Contains() [4/4]

bool cRect::Contains ( const cRect Rect) const

Returns true if this rectangle completely contains Rect.

◆ Grow() [1/2]

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 cSize::Grow(), point, cPoint::Shift(), and size.

Referenced by cTrueColorDemo::Action(), and Grown().

◆ Grow() [2/2]

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.

◆ Grown() [1/2]

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

Definition at line 396 of file include/vdr/osd.h.

References Grow().

Referenced by cTrueColorDemo::Action().

◆ Grown() [2/2]

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

Definition at line 396 of file osd.h.

References Grow().

◆ Height() [1/2]

int cRect::Height ( void  ) const
inline

◆ Height() [2/2]

int cRect::Height ( void  ) const
inline

Definition at line 368 of file osd.h.

References cSize::Height(), and size.

◆ Intersected() [1/2]

cRect cRect::Intersected ( const cRect Rect) const

◆ Intersected() [2/2]

cRect cRect::Intersected ( const cRect Rect) const

Returns the intersection of this rectangle and the given Rect.

◆ Intersects() [1/2]

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(), Left(), Right(), and Top().

Referenced by cOsd::RenderPixmaps().

◆ Intersects() [2/2]

bool cRect::Intersects ( const cRect Rect) const

Returns true if this rectangle intersects with Rect.

◆ IsEmpty() [1/2]

bool cRect::IsEmpty ( void  ) const
inline

◆ IsEmpty() [2/2]

bool cRect::IsEmpty ( void  ) const
inline

Returns true if this rectangle is empty.

Definition at line 415 of file osd.h.

References Height(), and Width().

◆ Left() [1/2]

int cRect::Left ( void  ) const
inline

◆ Left() [2/2]

int cRect::Left ( void  ) const
inline

Definition at line 369 of file osd.h.

References X().

◆ operator!=() [1/2]

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

Definition at line 364 of file include/vdr/osd.h.

◆ operator!=() [2/2]

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

Definition at line 364 of file osd.h.

◆ operator==() [1/2]

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

Definition at line 363 of file include/vdr/osd.h.

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

◆ operator==() [2/2]

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

Definition at line 363 of file osd.h.

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

◆ Point() [1/2]

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

◆ Point() [2/2]

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

Definition at line 373 of file osd.h.

References point.

◆ Right() [1/2]

int cRect::Right ( void  ) const
inline

◆ Right() [2/2]

int cRect::Right ( void  ) const
inline

Definition at line 371 of file osd.h.

References Width(), and X().

◆ Set() [1/4]

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

Definition at line 376 of file include/vdr/osd.h.

References point, Point(), cSize::Set(), cPoint::Set(), size, and Size().

◆ Set() [2/4]

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

Definition at line 376 of file osd.h.

References point, Point(), cSize::Set(), cPoint::Set(), size, and Size().

◆ Set() [3/4]

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

Definition at line 375 of file include/vdr/osd.h.

References Height(), point, cSize::Set(), cPoint::Set(), size, Width(), X(), and Y().

Referenced by cTrueColorDemo::Action(), and Combine().

◆ Set() [4/4]

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

Definition at line 375 of file osd.h.

References Height(), point, cSize::Set(), cPoint::Set(), size, Width(), X(), and Y().

◆ SetBottom() [1/2]

void cRect::SetBottom ( int  Bottom)
inline

Definition at line 388 of file include/vdr/osd.h.

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

Referenced by cTrueColorDemo::Action(), Combine(), and Intersected().

◆ SetBottom() [2/2]

void cRect::SetBottom ( int  Bottom)
inline

Definition at line 388 of file osd.h.

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

◆ SetHeight() [1/2]

void cRect::SetHeight ( int  Height)
inline

Definition at line 384 of file include/vdr/osd.h.

References Height(), cSize::SetHeight(), and size.

Referenced by SetBottom(), and SetTop().

◆ SetHeight() [2/2]

void cRect::SetHeight ( int  Height)
inline

Definition at line 384 of file osd.h.

References Height(), cSize::SetHeight(), and size.

◆ SetLeft() [1/2]

void cRect::SetLeft ( int  Left)
inline

Definition at line 385 of file include/vdr/osd.h.

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

Referenced by Combine(), and Intersected().

◆ SetLeft() [2/2]

void cRect::SetLeft ( int  Left)
inline

Definition at line 385 of file osd.h.

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

◆ SetPoint() [1/4]

void cRect::SetPoint ( const cPoint Point)
inline

Definition at line 378 of file include/vdr/osd.h.

References point, Point(), and cPoint::Set().

◆ SetPoint() [2/4]

void cRect::SetPoint ( const cPoint Point)
inline

Definition at line 378 of file osd.h.

References point, Point(), and cPoint::Set().

◆ SetPoint() [3/4]

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

◆ SetPoint() [4/4]

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

Definition at line 377 of file osd.h.

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

◆ SetRight() [1/2]

void cRect::SetRight ( int  Right)
inline

Definition at line 387 of file include/vdr/osd.h.

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

Referenced by cTrueColorDemo::Action(), Combine(), and Intersected().

◆ SetRight() [2/2]

void cRect::SetRight ( int  Right)
inline

Definition at line 387 of file osd.h.

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

◆ SetSize() [1/4]

void cRect::SetSize ( const cSize Size)
inline

Definition at line 380 of file include/vdr/osd.h.

References cSize::Set(), size, and Size().

◆ SetSize() [2/4]

void cRect::SetSize ( const cSize Size)
inline

Definition at line 380 of file osd.h.

References cSize::Set(), size, and Size().

◆ SetSize() [3/4]

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

Definition at line 379 of file include/vdr/osd.h.

References Height(), cSize::Set(), size, and Width().

◆ SetSize() [4/4]

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

Definition at line 379 of file osd.h.

References Height(), cSize::Set(), size, and Width().

◆ SetTop() [1/2]

void cRect::SetTop ( int  Top)
inline

Definition at line 386 of file include/vdr/osd.h.

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

Referenced by Combine(), and Intersected().

◆ SetTop() [2/2]

void cRect::SetTop ( int  Top)
inline

Definition at line 386 of file osd.h.

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

◆ SetWidth() [1/2]

void cRect::SetWidth ( int  Width)
inline

Definition at line 383 of file include/vdr/osd.h.

References cSize::SetWidth(), size, and Width().

Referenced by SetLeft(), and SetRight().

◆ SetWidth() [2/2]

void cRect::SetWidth ( int  Width)
inline

Definition at line 383 of file osd.h.

References cSize::SetWidth(), size, and Width().

◆ SetX() [1/2]

void cRect::SetX ( int  X)
inline

Definition at line 381 of file include/vdr/osd.h.

References point, cPoint::SetX(), and X().

Referenced by SetLeft().

◆ SetX() [2/2]

void cRect::SetX ( int  X)
inline

Definition at line 381 of file osd.h.

References point, cPoint::SetX(), and X().

◆ SetY() [1/2]

void cRect::SetY ( int  Y)
inline

Definition at line 382 of file include/vdr/osd.h.

References point, cPoint::SetY(), and Y().

Referenced by SetTop().

◆ SetY() [2/2]

void cRect::SetY ( int  Y)
inline

Definition at line 382 of file osd.h.

References point, cPoint::SetY(), and Y().

◆ Shift() [1/4]

void cRect::Shift ( const cPoint Dp)
inline

Definition at line 390 of file include/vdr/osd.h.

References point, and cPoint::Shift().

◆ Shift() [2/4]

void cRect::Shift ( const cPoint Dp)
inline

Definition at line 390 of file osd.h.

References point, and cPoint::Shift().

◆ Shift() [3/4]

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

Definition at line 389 of file include/vdr/osd.h.

References point, and cPoint::Shift().

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

◆ Shift() [4/4]

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

Definition at line 389 of file osd.h.

References point, and cPoint::Shift().

◆ Shifted() [1/4]

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

Definition at line 392 of file include/vdr/osd.h.

References Shift().

◆ Shifted() [2/4]

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

Definition at line 392 of file osd.h.

References Shift().

◆ Shifted() [3/4]

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

◆ Shifted() [4/4]

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

Definition at line 391 of file osd.h.

References Shift().

◆ Size() [1/2]

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

Definition at line 374 of file include/vdr/osd.h.

References size.

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

◆ Size() [2/2]

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

Definition at line 374 of file osd.h.

References size.

◆ Top() [1/2]

int cRect::Top ( void  ) const
inline

◆ Top() [2/2]

int cRect::Top ( void  ) const
inline

Definition at line 370 of file osd.h.

References Y().

◆ Width() [1/2]

int cRect::Width ( void  ) const
inline

◆ Width() [2/2]

int cRect::Width ( void  ) const
inline

Definition at line 367 of file osd.h.

References size, and cSize::Width().

◆ X() [1/2]

int cRect::X ( void  ) const
inline

◆ X() [2/2]

int cRect::X ( void  ) const
inline

Definition at line 365 of file osd.h.

References point, and cPoint::X().

◆ Y() [1/2]

int cRect::Y ( void  ) const
inline

◆ Y() [2/2]

int cRect::Y ( void  ) const
inline

Definition at line 366 of file osd.h.

References point, and cPoint::Y().

Member Data Documentation

◆ Null

static const cRect cRect::Null
static

◆ point

cPoint cRect::point
private

Definition at line 354 of file include/vdr/osd.h.

Referenced by Grow(), operator==(), Point(), Set(), SetPoint(), SetX(), SetY(), Shift(), X(), and Y().

◆ size

cSize cRect::size
private

Definition at line 355 of file include/vdr/osd.h.

Referenced by Grow(), Height(), operator==(), Set(), SetHeight(), SetSize(), SetWidth(), Size(), and Width().


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