00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013 #ifndef LTI_SCENE_H
00014 #define LTI_SCENE_H
00015
00016
00017 #include "lti_types.h"
00018
00019
00020 LT_BEGIN_NAMESPACE(LizardTech)
00021
00022
00023
00064 class LTIScene
00065 {
00066 public:
00078 LTIScene(double ulX, double ulY,
00079 double width, double height,
00080 double magnification);
00081
00085 LTIScene(const LTIScene& copy);
00086
00093 LTIScene(void);
00094
00098 LTIScene& operator=(const LTIScene&);
00099
00103 bool operator==(const LTIScene&) const;
00104
00108 bool operator!=(const LTIScene&) const;
00109
00110
00118 double getMag() const;
00119
00120
00125
00133 double getUpperLeftX() const;
00134
00142 double getUpperLeftY() const;
00143
00151 double getLowerRightX() const;
00152
00160 double getLowerRightY() const;
00161
00169 double getUpperRightX() const;
00170
00178 double getUpperRightY() const;
00179
00187 double getLowerLeftX() const;
00188
00196 double getLowerLeftY() const;
00197
00205 double getCenterX() const;
00206
00214 double getCenterY() const;
00215
00227
00235 lt_int32 getUpperLeftCol() const;
00236
00244 lt_int32 getUpperLeftRow() const;
00245
00253 lt_int32 getLowerRightCol() const;
00254
00262 lt_int32 getLowerRightRow() const;
00263
00271 lt_int32 getUpperRightCol() const;
00272
00280 lt_int32 getUpperRightRow() const;
00281
00289 lt_int32 getLowerLeftCol() const;
00290
00298 lt_int32 getLowerLeftRow() const;
00299
00307 lt_int32 getCenterCol() const;
00308
00316 lt_int32 getCenterRow() const;
00317
00326
00334 double getWidth() const;
00335
00343 double getHeight() const;
00344
00352 lt_int32 getNumCols() const;
00353
00361 lt_int32 getNumRows() const;
00362
00371
00380 double getX() const;
00381
00390 double getY() const;
00391
00403 void getPoints(double& ulX, double& ulY,
00404 double& lrX, double& lrY) const;
00405
00423 void getPoints(double& ulX, double& ulY,
00424 double& urX, double& urY,
00425 double& llX, double& llY,
00426 double& lrX, double& lrY,
00427 double& cX, double& cY) const;
00428
00440 void getPoints(lt_int32& ulX, lt_int32& ulY,
00441 lt_int32& lrX, lt_int32& lrY) const;
00442
00460 void getPoints(lt_int32& ulX, lt_int32& ulY,
00461 lt_int32& urX, lt_int32& urY,
00462 lt_int32& llX, lt_int32& llY,
00463 lt_int32& lrX, lt_int32& lrY,
00464 lt_int32& cX, lt_int32& cY) const;
00473 LTIScene clip(double width, double height) const;
00474
00475 protected:
00476 double m_ulX, m_ulY;
00477 double m_width, m_height;
00478 double m_magnification;
00479
00480 private:
00481 lt_int32 getHalfWidth_i() const;
00482 lt_int32 getHalfHeight_i() const;
00483 };
00484
00485
00486 LT_END_NAMESPACE(LizardTech)
00487
00488
00489 #endif // LTI_SCENE_H