File indexing completed on 2026-09-13 09:16:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef Draw_View_Header
0015 #define Draw_View_Header
0016
0017 #include <gp_Trsf.hxx>
0018 #include <Draw_Window.hxx>
0019
0020 class Draw_Viewer;
0021
0022 class Draw_View : public Draw_Window
0023 {
0024 public:
0025
0026 Draw_View(int theId,
0027 Draw_Viewer* theViewer,
0028 int theX,
0029 int theY,
0030 int theWidth,
0031 int theHeight,
0032 Aspect_Drawable theWindow = 0);
0033
0034
0035 Draw_View(int theId, Draw_Viewer* theViewer, const char* theTitle);
0036
0037
0038 ~Draw_View() override;
0039
0040 public:
0041
0042 int GetDx() const { return myDx; }
0043
0044
0045 void SetDx(const int theDx) { myDx = theDx; }
0046
0047
0048 int GetDy() const { return myDy; }
0049
0050
0051 void SetDy(const int theDy) { myDy = theDy; }
0052
0053
0054 double GetZoom() const { return myZoom; }
0055
0056
0057 void SetZoom(const double theZoom) { myZoom = theZoom; }
0058
0059
0060 const gp_Trsf& GetMatrix() const { return myMatrix; }
0061
0062
0063 void SetMatrix(const gp_Trsf& theMatrix) { myMatrix = theMatrix; }
0064
0065
0066 double GetFocalDistance() const { return myFocalDistance; }
0067
0068
0069 void SetFocalDistance(const double theDistance) { myFocalDistance = theDistance; }
0070
0071
0072 const char* Type() { return myType; }
0073
0074
0075 bool Is2D() const { return myIs2D; }
0076
0077
0078 double IsPerspective() const { return myIsPers; }
0079
0080 public:
0081
0082 bool Init(const char* theType);
0083
0084
0085 void Transform(const gp_Trsf& theTransformation);
0086
0087
0088 void ResetFrame();
0089
0090
0091 void GetFrame(int& theX0, int& theY0, int& theX1, int& theY1);
0092
0093
0094 void WExpose() override;
0095
0096 protected:
0097 int myId;
0098 Draw_Viewer* myViewer;
0099 char myType[5];
0100 bool myIsPers;
0101 bool myIs2D;
0102 double myFocalDistance;
0103 double myZoom;
0104 gp_Trsf myMatrix;
0105 int myDx;
0106 int myDy;
0107 int myFrameX0;
0108 int myFrameY0;
0109 int myFrameX1;
0110 int myFrameY1;
0111 };
0112
0113 #endif