00001 #ifndef ZOOM_H
00002 #define ZOOM_H
00003 #include <qpainter.h>
00004 #include <qfont.h>
00005 #include "QCoordsRect.h"
00006 #include "FontAccess.h"
00007 #include "FTFont.h"
00008 #include "Painter.h"
00009 class QCoords
00010 {
00011 public:
00012 QCoords (float, float);
00013 float x;
00014 float y;
00015
00016 };
00020 class ZoomFactor
00021 {
00022
00023 int resX;
00024 int resY;
00025 double zoomFactor;
00026
00027 public:
00028 double x;
00029 double y;
00030 ZoomFactor (float x = 0, float y = 0, float zoom = 1,int resX=1,int resY=1);
00031 void setOrg (QCoords a);
00032 QPoint convert (float, float);
00033 QCoords invert (int, int);
00034 QCoords invert (QPoint);
00035 void setZoomFactor(double);
00036 void setRes(int resX,int resY);
00037 double getZoomFactor();
00038 double convertYLength(double);
00039 double convertXLength(double);
00040 double getEffectiveXZoomFactor();
00041 double getEffectiveYZoomFactor();
00042 double getZoom();
00043 void zoom (float, QCoords);
00044 QString toString();
00045
00046
00047 };
00048 #endif