// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Graphic2d_ViewMapping_HeaderFile #define _Graphic2d_ViewMapping_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Graphic2d_ViewMapping_HeaderFile #include #endif #ifndef _Quantity_Length_HeaderFile #include #endif #ifndef _MMgt_TShared_HeaderFile #include #endif #ifndef _Quantity_Factor_HeaderFile #include #endif //! A ViewMapping defines a square region of the model
//! space from an origin point and a size in meters.
//! This square region is called the "map from".
class Graphic2d_ViewMapping : public MMgt_TShared { public: //! Creates a view mapping with the following default
//! values :
//! XCenter = 0.
//! YCenter = 0.
//! Size = 1.
Standard_EXPORT Graphic2d_ViewMapping(); //! Sets new values for the view mapping .
Standard_EXPORT void SetViewMapping(const Quantity_Length aXCenter,const Quantity_Length aYCenter,const Quantity_Length aSize) ; //! Sets new values for the view mapping center.
Standard_EXPORT void SetCenter(const Quantity_Length aXCenter,const Quantity_Length aYCenter) ; //! Sets new value for the view mapping size.
Standard_EXPORT void SetSize(const Quantity_Length aSize) ; //! Saves the current mapping which will be the
//! reference value for the reset of the mapping
//! done by the ViewmappingReset method.
Standard_EXPORT void SetViewMappingDefault() ; //! Sets the value of the mapping to be the same as
//! the mapping saved by the SetViewMappingDefault method.
Standard_EXPORT void ViewMappingReset() ; //! Returns the current mapping of the view .
Standard_EXPORT void ViewMapping(Quantity_Length& XCenter,Quantity_Length& YCenter,Quantity_Length& Size) const; //! Returns the current center of the view .
Standard_EXPORT void Center(Quantity_Length& XCenter,Quantity_Length& YCenter) const; //! Returns the current reset mapping of the view .
Standard_EXPORT void ViewMappingDefault(Quantity_Length& XCenter,Quantity_Length& YCenter,Quantity_Length& Size) const; //! Returns the zoom factor (CurrentSize/InitialSize).
Standard_EXPORT Quantity_Factor Zoom() const; DEFINE_STANDARD_RTTI(Graphic2d_ViewMapping) protected: private: Quantity_Length myXCenter; Quantity_Length myYCenter; Quantity_Length mySize; Quantity_Length myInitialXCenter; Quantity_Length myInitialYCenter; Quantity_Length myInitialSize; }; // other Inline functions and methods (like "C++: function call" methods) #endif