Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

JArea Class Reference

#include <Area.hpp>

List of all members.

Public Methods

 JArea ()
 JArea (const JArea &a)
 JArea (const JArea &a, const double scale)
 JArea (const double Left, const double Right, const double Bottom, const double Top)
 JArea (const JVector2D &BottomLeft, const JVector2D &TopRight)
virtual ~JArea ()
BOOL operator== (const JArea &a) const
BOOL operator!= (const JArea &a) const
JArea & operator= (const JArea &a)
double JArea () const
double Left () const
double Left (const double l)
double Right () const
double Right (const double r)
double Top () const
double Top (const double t)
double Bottom () const
double Bottom (const double b)
double X () const
double XScale (const double Scale) const
double Y () const
double YScale (const double Scale) const
void SetAll (const double Left, const double Right, const double Bottom, const double Top)
void SetOrg (const JVector2D &v)
void SetLowerRight (const JVector2D &v)
JVector2D vecLL () const
JVector2D vecLR () const
JVector2D vecUL () const
JVector2D vecUR () const
 JArea ()
 JArea (const JArea &a)
 JArea (const JArea &a, const double scale)
 JArea (const double Left, const double Right, const double Bottom, const double Top)
 JArea (const JVector2D &BottomLeft, const JVector2D &TopRight)
virtual ~JArea ()
BOOL operator== (const JArea &a) const
BOOL operator!= (const JArea &a) const
JArea & operator= (const JArea &a)
double JArea () const
double Left () const
double Left (const double l)
double Right () const
double Right (const double r)
double Top () const
double Top (const double t)
double Bottom () const
double Bottom (const double b)
double X () const
double XScale (const double Scale) const
double Y () const
double YScale (const double Scale) const
void SetAll (const double Left, const double Right, const double Bottom, const double Top)
void SetOrg (const JVector2D &v)
void SetLowerRight (const JVector2D &v)
JVector2D vecLL () const
JVector2D vecLR () const
JVector2D vecUL () const
JVector2D vecUR () const

Private Methods

void AdjustCoordinates ()
void AdjustCoordinates ()

Private Attributes

double Left
double Right
double Bottom
double Top


Constructor & Destructor Documentation

JArea::JArea   [inline]
 

Definition at line 6 of file Area.cpp.

00007   : Bottom( 0.0 ), Left( 0.0 ), Right( 0.0 ), Top( 0.0 ) { }

JArea::JArea const JArea &    a [inline]
 

Definition at line 9 of file Area.cpp.

00010   : Bottom( a.Bottom ), Left( a.Left ), Right( a.Right ), Top( a.Top ) { }

JArea::JArea const JArea &    a,
const double    ScaleBy
[inline]
 

Definition at line 12 of file Area.cpp.

00013  : Bottom( a.Bottom ) * ScaleBy ), Left( a.Left ) * ScaleBy ),
00014    Right(  a.Right  ) * ScaleBy ), Top(  a.Top  ) * ScaleBy ) { }

JArea::JArea const double    left,
const double    right,
const double    bottom,
const double    top
[inline]
 

Definition at line 16 of file Area.cpp.

00019  : Bottom(bottom), Left(left), Right(right), Top(top)
00020 {
00021   AdjustCoordinates();
00022 }

JArea::JArea const JVector2D   vecLL,
const JVector2D   vecUR
 

Definition at line 24 of file Area.cpp.

00025   : Bottom( vecLL.X() ), Left( vecLL.Y() ),
00026     Right(  vecUR.X() ), Top(  vecUR.Y() )
00027 {
00028   AdjustCoordinates();
00029 }

virtual JArea::~JArea   [inline, virtual]
 

Definition at line 14 of file Area.hpp.

00014 { }

double JArea::JArea   const [inline]
 

Definition at line 40 of file Area.cpp.

00040                                  {
00041   return ((Right - Left) * (Top - Bottom));
00042 }

JArea::JArea  
 

JArea::JArea const JArea &    a
 

JArea::JArea const JArea &    a,
const double    scale
 

JArea::JArea const double    Left,
const double    Right,
const double    Bottom,
const double    Top
 

JArea::JArea const JVector2D   BottomLeft,
const JVector2D   TopRight
 

virtual JArea::~JArea   [inline, virtual]
 

Definition at line 14 of file Area.hpp.

00014 { }

double JArea::JArea   const
 


Member Function Documentation

void JArea::AdjustCoordinates   [private]
 

void JArea::AdjustCoordinates   [private]
 

Definition at line 152 of file Area.cpp.

Referenced by JArea(), and SetAll().

00152                               {
00153   double temp;
00154   if (Bottom > Top) {
00155     temp   = Top;
00156     Top    = Bottom;
00157     Bottom = temp;
00158   }
00159     
00160   if (Left > Right) {
00161     temp  = Left;
00162     Left  = Right; 
00163     Right = temp;
00164   }
00165 }

double JArea::Bottom const double    b
 

double JArea::Bottom   const
 

double JArea::Bottom const double    b
 

double JArea::Bottom   const
 

Referenced by SetLowerRight(), and operator=().

double JArea::Left const double    l
 

double JArea::Left   const
 

double JArea::Left const double    l
 

double JArea::Left   const
 

Referenced by SetOrg(), and operator=().

double JArea::Right const double    r
 

double JArea::Right   const
 

double JArea::Right const double    r
 

double JArea::Right   const
 

Referenced by SetLowerRight(), and operator=().

void JArea::SetAll const double    Left,
const double    Right,
const double    Bottom,
const double    Top
 

void JArea::SetAll const double    left,
const double    right,
const double    bottom,
const double    top
[inline]
 

Definition at line 76 of file Area.cpp.

00077                                                                   {
00078   Bottom = bottom;
00079   Left   = left;
00080   Right  = right;
00081   Top    = top;
00082 
00083   AdjustCoordinates();
00084 }

void JArea::SetLowerRight const JVector2D   v
 

void JArea::SetLowerRight const JVector2D   v
 

Definition at line 141 of file Area.cpp.

00141                                             {
00142   Right(  v.X() );
00143   Bottom( v.Y() );
00144 }

void JArea::SetOrg const JVector2D   v
 

void JArea::SetOrg const JVector2D   v
 

Definition at line 136 of file Area.cpp.

00136                                        {
00137   Left( v.X() );
00138   Top(  v.Y() );
00139 }

double JArea::Top const double    t
 

double JArea::Top   const
 

double JArea::Top const double    t
 

double JArea::Top   const
 

Referenced by SetOrg(), and operator=().

double JArea::X   const
 

double JArea::X   const [inline]
 

Definition at line 44 of file Area.cpp.

00044                              {
00045   return (Right - Left);
00046 }

double JArea::XScale const double    Scale const
 

double JArea::XScale const double    Scale const [inline]
 

Definition at line 52 of file Area.cpp.

00052                                                 {
00053   return (Right - Left) * Scale;
00054 }

double JArea::Y   const
 

double JArea::Y   const [inline]
 

Definition at line 48 of file Area.cpp.

00048                              {
00049   return (Top - Bottom);
00050 }

double JArea::YScale const double    Scale const
 

double JArea::YScale const double    Scale const [inline]
 

Definition at line 56 of file Area.cpp.

00056                                                 {
00057   return (Top - Bottom) * Scale;
00058 }

BOOL JArea::operator!= const JArea &    a const
 

BOOL JArea::operator!= const JArea &    a const [inline]
 

Definition at line 36 of file Area.cpp.

00036                                                     {
00037   return !Compare( a );
00038 }

JArea& JArea::operator= const JArea &    a
 

JArea & JArea::operator= const JArea &    a
 

Definition at line 102 of file Area.cpp.

00102                                         {
00103   Bottom = a.Bottom;
00104   Left   = a.Left;
00105   Right  = a.Right;
00106   Top    = a.Top;
00107 
00108   return *this;
00109 }

BOOL JArea::operator== const JArea &    a const
 

BOOL JArea::operator== const JArea &    a const
 

JVector2D JArea::vecLL   const
 

JVector2D JArea::vecLL   const
 

JVector2D JArea::vecLR   const
 

JVector2D JArea::vecLR   const [inline]
 

Definition at line 90 of file Area.cpp.

00090                                     {
00091   return JVector2D( Right, Bottom );
00092 }

JVector2D JArea::vecUL   const
 

JVector2D JArea::vecUL   const [inline]
 

Definition at line 94 of file Area.cpp.

00094                                     {
00095   return JVector2D( Left, Top );
00096 }

JVector2D JArea::vecUR   const
 

JVector2D JArea::vecUR   const [inline]
 

Definition at line 98 of file Area.cpp.

00098                                     {
00099   return JVector2D( Right, Top );
00100 }


Member Data Documentation

double JArea::Bottom [inline, private]
 

Definition at line 51 of file Area.hpp.

double JArea::Left [inline, private]
 

Definition at line 49 of file Area.hpp.

double JArea::Right [inline, private]
 

Definition at line 50 of file Area.hpp.

double JArea::Top [inline, private]
 

VERIFY THIS, SOUNDS WEIRD !

Definition at line 52 of file Area.hpp.


The documentation for this class was generated from the following files:
Generated on Sun Oct 14 18:48:43 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001