MityDSP Documentation Index
Public Member Functions
MityDSP::tcRect Class Reference

#include <guiDspDisplay.h>

List of all members.

Public Member Functions

 tcRect ()
 tcRect (int x, int y, int w, int h)
 tcRect (const tcPoint &p, const tcSize &s)
void setRect (int x, int y, int w, int h)
void setCoords (int x1, int y1, int x2, int y2)
bool isNull () const
bool isEmpty () const
bool isValid () const
int x () const
int y () const
int w () const
int h () const
int left () const
int right () const
int top () const
int bottom () const
void offset (const tcPoint &p)
void inflate (const tcSize &s)
void deflate (const tcSize &s)
tcRect normalized () const
bool contains (int x, int y, bool border=true) const
bool quick_contains (int x, int y) const
tcRect operator| (const tcRect &r) const
tcRect operator& (const tcRect &r) const
tcRectoperator|= (const tcRect &r)
tcRectoperator&= (const tcRect &r)

Detailed Description

The tcRect class provides a logical rectangle representation of a screen area between two points (upper left corner and lower right corner).


Constructor & Destructor Documentation

MityDSP::tcRect::tcRect ( )
inline
MityDSP::tcRect::tcRect ( int  x,
int  y,
int  w,
int  h 
)
inline
MityDSP::tcRect::tcRect ( const tcPoint p,
const tcSize s 
)
inline

Member Function Documentation

void MityDSP::tcRect::setRect ( int  x,
int  y,
int  w,
int  h 
)
inline
void MityDSP::tcRect::setCoords ( int  x1,
int  y1,
int  x2,
int  y2 
)
inline
bool MityDSP::tcRect::isNull ( ) const
inline
bool MityDSP::tcRect::isEmpty ( ) const
inline
bool MityDSP::tcRect::isValid ( ) const
inline
int MityDSP::tcRect::x ( ) const
inline
int MityDSP::tcRect::y ( ) const
inline
int MityDSP::tcRect::w ( ) const
inline
int MityDSP::tcRect::h ( ) const
inline
int MityDSP::tcRect::left ( ) const
inline
int MityDSP::tcRect::right ( ) const
inline
int MityDSP::tcRect::top ( ) const
inline
int MityDSP::tcRect::bottom ( ) const
inline
void MityDSP::tcRect::offset ( const tcPoint p)
inline
void MityDSP::tcRect::inflate ( const tcSize s)
inline
void MityDSP::tcRect::deflate ( const tcSize s)
inline
tcRect tcRect::normalized ( ) const

Ensures that X1/X2 and Y1/Y2 coordinates are aligned in a positive increasing order. I.E., X2 > X1 and Y2 > Y1. First point is upper left and second point is bottom right (with 0,0 at "upper left"

See also:
guiDspDisplay.h
bool tcRect::contains ( int  x,
int  y,
bool  border = true 
) const

Check if point contained in rectangle.

Parameters:
xx position of point
yy position of point
borderwhen true, include 1 pixel "pad" in check.
Returns:
true if contained within rectangle
See also:
guiDspDisplay.h
bool MityDSP::tcRect::quick_contains ( int  x,
int  y 
) const
inline
tcRect tcRect::operator| ( const tcRect r) const

Perform logical OR'ing of two rects.

Returns:
A rectangle the encompasses both sides of OR'ing operator.
See also:
guiDspDisplay.h
tcRect tcRect::operator& ( const tcRect r) const

Perform logical AND'ing of two rects.

Returns:
Largest rectangle the encompassed by both sides of AND'ing operator.
See also:
guiDspDisplay.h
tcRect & MityDSP::tcRect::operator|= ( const tcRect r)
inline
tcRect & MityDSP::tcRect::operator&= ( const tcRect r)
inline

  
Generated on Mon Apr 22 2013 11:33:51 for MityDSP Skinnable Graphics User Interface (GGUI) by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.