File indexing completed on 2025-01-18 10:03:24
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
0027 Draw_View(Standard_Integer theId,
0028 Draw_Viewer* theViewer,
0029 Standard_Integer theX,
0030 Standard_Integer theY,
0031 Standard_Integer theWidth,
0032 Standard_Integer theHeight,
0033 Aspect_Drawable theWindow = 0);
0034
0035
0036 Draw_View(Standard_Integer theId,
0037 Draw_Viewer* theViewer,
0038 const char* theTitle);
0039
0040
0041 ~Draw_View();
0042
0043 public:
0044
0045
0046 Standard_Integer GetDx() const { return myDx; }
0047
0048
0049 void SetDx (const Standard_Integer theDx) { myDx = theDx; }
0050
0051
0052 Standard_Integer GetDy() const { return myDy; }
0053
0054
0055 void SetDy (const Standard_Integer theDy) { myDy = theDy; }
0056
0057
0058 Standard_Real GetZoom() const { return myZoom; }
0059
0060
0061 void SetZoom (const Standard_Real theZoom) { myZoom = theZoom; }
0062
0063
0064 const gp_Trsf& GetMatrix() const { return myMatrix; }
0065
0066
0067 void SetMatrix (const gp_Trsf& theMatrix) { myMatrix = theMatrix; }
0068
0069
0070 Standard_Real GetFocalDistance() const { return myFocalDistance; }
0071
0072
0073 void SetFocalDistance (const Standard_Real theDistance) { myFocalDistance = theDistance; }
0074
0075
0076 const char* Type() { return myType; }
0077
0078
0079 Standard_Boolean Is2D() const { return myIs2D; }
0080
0081
0082 Standard_Real IsPerspective() const { return myIsPers; }
0083
0084 public:
0085
0086
0087 Standard_Boolean Init(const char* theType);
0088
0089
0090 void Transform(const gp_Trsf& theTransformation);
0091
0092
0093 void ResetFrame();
0094
0095
0096 void GetFrame(Standard_Integer& theX0,Standard_Integer& theY0,
0097 Standard_Integer& theX1,Standard_Integer& theY1);
0098
0099
0100 virtual void WExpose() Standard_OVERRIDE;
0101
0102 protected:
0103
0104 Standard_Integer myId;
0105 Draw_Viewer* myViewer;
0106 char myType[5];
0107 Standard_Boolean myIsPers;
0108 Standard_Boolean myIs2D;
0109 Standard_Real myFocalDistance;
0110 Standard_Real myZoom;
0111 gp_Trsf myMatrix;
0112 Standard_Integer myDx;
0113 Standard_Integer myDy;
0114 Standard_Integer myFrameX0;
0115 Standard_Integer myFrameY0;
0116 Standard_Integer myFrameX1;
0117 Standard_Integer myFrameY1;
0118 };
0119
0120 #endif