// 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_HidingGraphicObject_HeaderFile #define _Graphic2d_HidingGraphicObject_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Graphic2d_HidingGraphicObject_HeaderFile #include #endif #ifndef _Handle_Graphic2d_HArray1OfVertex_HeaderFile #include #endif #ifndef _Graphic2d_TypeOfFrame_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Quantity_Length_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Graphic2d_GraphicObject_HeaderFile #include #endif #ifndef _Handle_Graphic2d_View_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Drawer_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Primitive_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif class Graphic2d_HArray1OfVertex; class Standard_OutOfRange; class Graphic2d_View; class Graphic2d_Array1OfVertex; class Graphic2d_Drawer; class Graphic2d_Primitive; class gp_GTrsf2d; //! Creates a 2D hiding graphic object in a view.
//! A graphic object is a primitives manager
//! which hide the others graphic objects
class Graphic2d_HidingGraphicObject : public Graphic2d_GraphicObject { public: //! Creates an hiding polygon object in the view
//! This graphic object manages a sequence of primitives.
//! describes the hiding polygon geometry
//! The frame is created with the default attributes :
//! * the hiding color index : 0 (the same as the view)
//! * the frame color index : 1
//! * the frame line type index : 0
//! * the frame line thickness index : 0
//! * the graphic object is :
//! - empty.
//! - plottable.
//! - drawable.
//! - pickable.
//! - not displayed.
//! - not highlighted.
//! - has a relative drawing priority of 0
Standard_EXPORT Graphic2d_HidingGraphicObject(const Handle(Graphic2d_View)& aView,const Graphic2d_Array1OfVertex& aFrame); //! Creates an hiding predefined object in the view .
//! the predefined TypeOfFrame must be one of :
//! TOF_RECTANGULAR,TOF_CIRCULAR.
//! the frame position and geometry is computed
//! automaticaly according to the contents of the
//! graphic object and the , parameter.
//! A graphic object manages a sequence of primitives.
//! Warning: The type of frame can be UNKNOWN,in this case the frame is
//! not drawn.
Standard_EXPORT Graphic2d_HidingGraphicObject(const Handle(Graphic2d_View)& aView,const Graphic2d_TypeOfFrame aType = Graphic2d_TOF_RECTANGULAR,const Quantity_Length aMargin1 = 0.0,const Quantity_Length aMargin2 = 0.0); //! Updates the frame geometry.
Standard_EXPORT void SetFrame(const Graphic2d_Array1OfVertex& aFrame) ; //! Updates & computes the frame geometry
//! automaticaly according to the contents of the
//! graphic object and the parameter.
//! Warning: The type of frame can be UNKNOWN,in this case the frame is
//! not drawn.
Standard_EXPORT void SetFrame(const Graphic2d_TypeOfFrame aFrameType,const Quantity_Length aMargin1 = 0.0,const Quantity_Length aMargin2 = 0.0) ; //! Updates the hiding color index of the background polygon.
Standard_EXPORT void SetHidingColorIndex(const Standard_Integer anIndex = 0) ; //! Updates the frame color index of the polygon.
Standard_EXPORT void SetFrameColorIndex(const Standard_Integer anIndex = 1) ; //! Updates the frame line type index of the polygon.
Standard_EXPORT void SetFrameTypeIndex(const Standard_Integer anIndex = 0) ; //! Updates the frame line thickness index of the polygon.
Standard_EXPORT void SetFrameWidthIndex(const Standard_Integer anIndex = 0) ; //! Returns the max usable relative priority of the
//! "hiding" graphic object.
Standard_EXPORT virtual Standard_Integer MaxPriority() const; //! Returns the min max values of the frame of .
//! Warning: If is empty
//! returns FALSE
//! and Minx = Miny = RealFirst ()
//! Maxx = Maxy = RealLast ()
Standard_EXPORT Standard_Boolean FrameMinMax(Quantity_Length& Minx,Quantity_Length& Maxx,Quantity_Length& Miny,Quantity_Length& Maxy) const; //! Returns the min max values of including
//! the frame and primitives inside.
//! Warning: If is empty or not displayed
//! returns FALSE
//! and Minx = Miny = RealFirst ()
//! Maxx = Maxy = RealLast ()
Standard_EXPORT virtual Standard_Boolean MinMax(Quantity_Length& Minx,Quantity_Length& Maxx,Quantity_Length& Miny,Quantity_Length& Maxy) const; //! Returns the frame geometry and type of
//! the hiding graphic object.
//! Warning: the frame can be NULL.
Standard_EXPORT Graphic2d_TypeOfFrame Frame(Graphic2d_Array1OfVertex& aFrame) const; //! Returns the hiding color index.
Standard_EXPORT Standard_Integer HidingColorIndex() const; //! Returns the frame color index.
Standard_EXPORT Standard_Integer FrameColorIndex() const; //! Returns the frame line type index.
Standard_EXPORT Standard_Integer FrameTypeIndex() const; //! Returns the frame line thickness index.
Standard_EXPORT Standard_Integer FrameWidthIndex() const; friend class Graphic2d_View; DEFINE_STANDARD_RTTI(Graphic2d_HidingGraphicObject) protected: private: //! Drawn the last Undrawn primitives managed by the
//! graphic object in the drawer .
Standard_EXPORT virtual void Draw(const Handle(Graphic2d_Drawer)& aDrawer,const Standard_Boolean Reset) ; //! Drawn a primitive managed by the
//! graphic object in the drawer .
//! Called by the method Graphic2d_View::Update (aPrimitive)
Standard_EXPORT virtual void Draw(const Handle(Graphic2d_Drawer)& aDrawer,const Handle(Graphic2d_Primitive)& aPrimitive) ; //! Returns Standard_True if the graphic object
//! is picked, Standard_False if not.
//! Called by the method Graphic2d_View::Pick
Standard_EXPORT virtual Standard_Boolean Pick(const Standard_Real X,const Standard_Real Y,const Standard_Real aPrecision,const Handle(Graphic2d_Drawer)& aDrawer) ; //! Returns the min usable absolute priority of the
//! "hiding" graphic object.
Standard_EXPORT virtual Standard_Integer BasePriority() const; //! Returns the transformed min max values of the frame .
Standard_EXPORT void TransformMinMax(const gp_GTrsf2d& aTrsf,Standard_Real& Minx,Standard_Real& Maxx,Standard_Real& Miny,Standard_Real& Maxy) const; Handle_Graphic2d_HArray1OfVertex myFrame; Graphic2d_TypeOfFrame myTypeOfFrame; Standard_Integer myHidingColorIndex; Standard_Integer myFrameColorIndex; Standard_Integer myFrameTypeIndex; Standard_Integer myFrameWidthIndex; Quantity_Length myFrameMargin1; Quantity_Length myFrameMargin2; Quantity_Length myXmin; Quantity_Length myYmin; Quantity_Length myXmax; Quantity_Length myYmax; Standard_Boolean myIsComputed; }; // other Inline functions and methods (like "C++: function call" methods) #endif