00001 #ifndef __J2K__JArea_HPP__ 00002 #define __J2K__JArea_HPP__ 00003 00004 class JArea { 00005 public: 00006 JArea(); 00007 JArea( const JArea& a ); // = 1.0 00008 JArea( const JArea& a, const double scale ); 00009 JArea( const double Left, const double Right, 00010 const double Bottom, const double Top ); 00011 00012 JArea( const JVector2D& BottomLeft, const JVector2D& TopRight ); 00013 00014 virtual ~JArea() { } 00015 00016 BOOL operator==( const JArea& a ) const; 00017 BOOL operator!=( const JArea& a ) const; 00018 00019 JArea& operator=( const JArea& a ); 00020 00021 double JArea() const; 00022 double Left() const; 00023 double Left( const double l ); 00024 double Right() const; 00025 double Right( const double r ); 00026 double Top() const; 00027 double Top( const double t ); 00028 double Bottom() const; 00029 double Bottom( const double b ); 00030 00031 double X() const; 00032 double XScale( const double Scale ) const; 00033 double Y() const; 00034 double YScale( const double Scale ) const; 00035 00036 void SetAll( const double Left, const double Right, 00037 const double Bottom, const double Top ); 00038 00039 void SetOrg( const JVector2D& v ); 00040 void SetLowerRight( const JVector2D& v ); 00041 00042 JVector2D vecLL() const; 00043 JVector2D vecLR() const; 00044 JVector2D vecUL() const; 00045 JVector2D vecUR() const; 00046 00047 private: 00048 void AdjustCoordinates(); 00049 double Left; 00050 double Right; 00051 double Bottom; 00052 double Top; 00053 }; 00054 00055 #endif