// 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 _Prs2d_Length_HeaderFile #define _Prs2d_Length_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Prs2d_Length_HeaderFile #include #endif #ifndef _Standard_ShortReal_HeaderFile #include #endif #ifndef _Prs2d_TypeOfDist_HeaderFile #include #endif #ifndef _Prs2d_Dimension_HeaderFile #include #endif #ifndef _Handle_Graphic2d_GraphicObject_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Prs2d_TypeOfArrow_HeaderFile #include #endif #ifndef _Prs2d_ArrowSide_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Drawer_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Aspect_FStream_HeaderFile #include #endif class Graphic2d_GraphicObject; class gp_Pnt2d; class TCollection_ExtendedString; class gp_Lin2d; class Graphic2d_Drawer; //! Constructs the primitive Length
class Prs2d_Length : public Prs2d_Dimension { public: //! Initializes the length dimension between points
//! anAttachPnt1 and anAttachPnt2.
//! aLength is length of the attach lines
//! aTypeDist defines the orientation of the displayed length:
//! AIS2D_TOD_AUTOMATIC
//! AIS2D_TOD_OBLIQUE
//! AIS2D_TOD_HORIZONTAL
//! AIS2D_TOD_VERTICAL
//! anArrow defines the number of arrows (one, two or none)
Standard_EXPORT Prs2d_Length(const Handle(Graphic2d_GraphicObject)& aGraphicObject,const gp_Pnt2d& anAttachPnt1,const gp_Pnt2d& anAttachPnt2,const TCollection_ExtendedString& aText,const Standard_Real aTxtScale = 5.0,const Standard_Real aLength = 0.0,const Prs2d_TypeOfDist aTypeDist = Prs2d_TOD_AUTOMATIC,const Standard_Real anArrAngle = 20.0,const Standard_Real anArrLength = 25.0,const Prs2d_TypeOfArrow anArrType = Prs2d_TOA_OPENED,const Prs2d_ArrowSide anArrow = Prs2d_AS_BOTHAR,const Standard_Boolean IsReverseArrow = Standard_False); //! Initializes the length dimension between point
//! anAttachPnt1 and line defined anAttachLin.
//! aLenAttachLin is length of the attach lines
Standard_EXPORT Prs2d_Length(const Handle(Graphic2d_GraphicObject)& aGraphicObject,const gp_Pnt2d& anAttachPnt,const gp_Lin2d& anAttachLin,const TCollection_ExtendedString& aText,const Standard_Real aTxtScale = 10.0,const Standard_Real aLenAttachLin = 0.0,const Standard_Real anArrAngle = 20.0,const Standard_Real anArrLength = 25.0,const Prs2d_TypeOfArrow anArrType = Prs2d_TOA_OPENED,const Prs2d_ArrowSide anArrow = Prs2d_AS_BOTHAR,const Standard_Boolean IsReverseArrow = Standard_False); //! Initializes the length dimension between line
//! anAttachLin1 and line defined anAttachLin2.
//! aLenAttachLin is length of the attach lines
Standard_EXPORT Prs2d_Length(const Handle(Graphic2d_GraphicObject)& aGraphicObject,const gp_Lin2d& anAttachLin1,const gp_Lin2d& anAttachLin2,const TCollection_ExtendedString& aText,const Standard_Real aTxtScale = 10.0,const Standard_Real aLenAttachLin = 0.0,const Standard_Real anArrAngle = 20.0,const Standard_Real anArrLength = 25.0,const Prs2d_TypeOfArrow anArrType = Prs2d_TOA_OPENED,const Prs2d_ArrowSide anArrow = Prs2d_AS_BOTHAR,const Standard_Boolean IsReverseArrow = Standard_False); //! Sets the length of attachment lines
Standard_EXPORT void SetAttachLinLength(const Standard_Real aLength) ; Standard_EXPORT virtual void Save(Aspect_FStream& aFStream) const; //! returns coordinates of points, which are begining
//! and end of arrow
Standard_EXPORT void LineCoord(gp_Pnt2d& aFirstPnt,gp_Pnt2d& aSecondPnt) const; //! returns coordinates of points, which are begining
//! and end of arrow
Standard_EXPORT void CallOutCoord(gp_Pnt2d& aFirstPnt,gp_Pnt2d& aSecondPnt) const; Standard_EXPORT Prs2d_TypeOfDist TypeOfDist() const; DEFINE_STANDARD_RTTI(Prs2d_Length) protected: //! Draws the length .
Standard_EXPORT void Draw(const Handle(Graphic2d_Drawer)& aDrawer) ; //! Draws element of the length .
Standard_EXPORT virtual void DrawElement(const Handle(Graphic2d_Drawer)& aDrawer,const Standard_Integer anIndex) ; //! Draws vertex of the length .
Standard_EXPORT virtual void DrawVertex(const Handle(Graphic2d_Drawer)& aDrawer,const Standard_Integer anIndex) ; //! Returns Standard_True if the length is picked,
//! Standard_False if not.
Standard_EXPORT Standard_Boolean Pick(const Standard_ShortReal X,const Standard_ShortReal Y,const Standard_ShortReal aPrecision,const Handle(Graphic2d_Drawer)& aDrawer) ; virtual void CalcTxtPos(const Standard_Boolean theFromAbs = Standard_False) ; private: Standard_EXPORT void GetPntProject(const Standard_Real aLength) ; Standard_EXPORT void ComputeArrows(const Standard_Boolean isnotPoints) ; Standard_ShortReal myX1; Standard_ShortReal myY1; Standard_ShortReal myX2; Standard_ShortReal myY2; Standard_ShortReal myAX1; Standard_ShortReal myAY1; Standard_ShortReal myAX2; Standard_ShortReal myAY2; Prs2d_TypeOfDist myTypeDist; Standard_ShortReal myXT1; Standard_ShortReal myYT1; Standard_ShortReal myXT2; Standard_ShortReal myYT2; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif