JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
JRect Class Reference

#include <JRect.h>

Public Member Functions

 JRect (const JPoint &p1, const JPoint &p2)
 
 JRect ()
 
 JRect (const JCoordinate t, const JCoordinate l, const JCoordinate b, const JCoordinate r)
 
JCoordinate width () const
 
JCoordinate height () const
 
JSize area () const
 
JCoordinate xcenter () const
 
JCoordinate ycenter () const
 
JPoint center () const
 
JPoint topLeft () const
 
JPoint bottomLeft () const
 
JPoint topRight () const
 
JPoint bottomRight () const
 
void Set (const JCoordinate t, const JCoordinate l, const JCoordinate b, const JCoordinate r)
 
void SetSize (const JCoordinate w, const JCoordinate h)
 
void Place (const JCoordinate t, const JCoordinate l)
 
void Place (const JPoint &pt)
 
bool IsEmpty () const
 
bool Contains (const JCoordinate x, const JCoordinate y) const
 
bool Contains (const JPoint &p) const
 
bool Contains (const JRect &r) const
 
void Shift (const JCoordinate dx, const JCoordinate dy)
 
void Shift (const JPoint delta)
 
void Shrink (const JCoordinate dx, const JCoordinate dy)
 
void Expand (const JCoordinate dx, const JCoordinate dy)
 

Public Attributes

JCoordinate top
 
JCoordinate left
 
JCoordinate bottom
 
JCoordinate right
 

Detailed Description

Defines portable rectangle type

System independent routines for dealing with rectangles

The coordinate system is the standard computer graphics system:
  +---> x
  |
  y

Constructor & Destructor Documentation

◆ JRect() [1/3]

JRect::JRect ( const JPoint p1,
const JPoint p2 
)

◆ JRect() [2/3]

JRect::JRect ( )
inline

◆ JRect() [3/3]

JRect::JRect ( const JCoordinate  t,
const JCoordinate  l,
const JCoordinate  b,
const JCoordinate  r 
)
inline

Member Function Documentation

◆ area()

JSize JRect::area ( ) const
inline

◆ bottomLeft()

JPoint JRect::bottomLeft ( ) const
inline

◆ bottomRight()

JPoint JRect::bottomRight ( ) const
inline

◆ center()

JPoint JRect::center ( ) const
inline

◆ Contains() [1/3]

bool JRect::Contains ( const JCoordinate  x,
const JCoordinate  y 
) const
inline

◆ Contains() [2/3]

bool JRect::Contains ( const JPoint p) const
inline

◆ Contains() [3/3]

bool JRect::Contains ( const JRect r) const
inline

◆ Expand()

void JRect::Expand ( const JCoordinate  dx,
const JCoordinate  dy 
)
inline

◆ height()

JCoordinate JRect::height ( ) const
inline

◆ IsEmpty()

bool JRect::IsEmpty ( ) const
inline

◆ Place() [1/2]

void JRect::Place ( const JCoordinate  t,
const JCoordinate  l 
)
inline

◆ Place() [2/2]

void JRect::Place ( const JPoint pt)
inline

◆ Set()

void JRect::Set ( const JCoordinate  t,
const JCoordinate  l,
const JCoordinate  b,
const JCoordinate  r 
)
inline

◆ SetSize()

void JRect::SetSize ( const JCoordinate  w,
const JCoordinate  h 
)
inline

◆ Shift() [1/2]

void JRect::Shift ( const JCoordinate  dx,
const JCoordinate  dy 
)
inline

◆ Shift() [2/2]

void JRect::Shift ( const JPoint  delta)
inline

◆ Shrink()

void JRect::Shrink ( const JCoordinate  dx,
const JCoordinate  dy 
)
inline

◆ topLeft()

JPoint JRect::topLeft ( ) const
inline

◆ topRight()

JPoint JRect::topRight ( ) const
inline

◆ width()

JCoordinate JRect::width ( ) const
inline

◆ xcenter()

JCoordinate JRect::xcenter ( ) const
inline

◆ ycenter()

JCoordinate JRect::ycenter ( ) const
inline

Member Data Documentation

◆ bottom

JCoordinate JRect::bottom

◆ left

JCoordinate JRect::left

◆ right

JCoordinate JRect::right

◆ top

JCoordinate JRect::top

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