OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV2d
Graphic2d


Graphic2d_HidingGraphicObject Class Reference

Creates a 2D hiding graphic object in a view.
A graphic object is a primitives manager
which hide the others graphic objects
.

#include <Graphic2d_HidingGraphicObject.hxx>

Inheritance diagram for Graphic2d_HidingGraphicObject:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT Graphic2d_HidingGraphicObject (const Handle(Graphic2d_View)&aView, const Graphic2d_Array1OfVertex &aFrame)
 Creates an hiding polygon object in the view <aview>
This graphic object manages a sequence of primitives.
<aframe> 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_TypeOfFrame aType=Graphic2d_TOF_RECTANGULAR, const Quantity_Length aMargin1=0.0, const Quantity_Length aMargin2=0.0)
 Creates an hiding predefined object in the view <aview>.
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 <amargin1>,<amargin2> 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 void SetFrame (const Graphic2d_Array1OfVertex &aFrame)
 Updates the frame geometry.
.
Standard_EXPORT void SetFrame (const Graphic2d_TypeOfFrame aFrameType, const Quantity_Length aMargin1=0.0, const Quantity_Length aMargin2=0.0)
 Updates & computes the frame geometry
automaticaly according to the contents of the
graphic object and the <amargin> parameter.
Warning: The type of frame can be UNKNOWN,in this case the frame is
not drawn.
.
Standard_EXPORT void SetHidingColorIndex (const Standard_Integer anIndex=0)
 Updates the hiding color index of the background polygon.
.
Standard_EXPORT void SetFrameColorIndex (const Standard_Integer anIndex=1)
 Updates the frame color index of the polygon.
.
Standard_EXPORT void SetFrameTypeIndex (const Standard_Integer anIndex=0)
 Updates the frame line type index of the polygon.
.
Standard_EXPORT void SetFrameWidthIndex (const Standard_Integer anIndex=0)
 Updates the frame line thickness index of the polygon.
.
virtual Standard_EXPORT Standard_Integer MaxPriority () const
 Returns the max usable relative priority of the
"hiding" graphic object.
.
Standard_EXPORT Standard_Boolean FrameMinMax (Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const
 Returns the min max values of the frame of <me>.
Warning: If <me> is empty
returns FALSE
and Minx = Miny = RealFirst ()
Maxx = Maxy = RealLast ()
.
virtual Standard_EXPORT Standard_Boolean MinMax (Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const
 Returns the min max values of <me> including
the frame and primitives inside.
Warning: If <me> is empty or not displayed
returns FALSE
and Minx = Miny = RealFirst ()
Maxx = Maxy = RealLast ()
.
Standard_EXPORT Graphic2d_TypeOfFrame Frame (Graphic2d_Array1OfVertex &aFrame) const
 Returns the frame geometry and type of
the hiding graphic object.
Warning: the frame can be NULL.
.
Standard_EXPORT Standard_Integer HidingColorIndex () const
 Returns the hiding color index.
.
Standard_EXPORT Standard_Integer FrameColorIndex () const
 Returns the frame color index.
.
Standard_EXPORT Standard_Integer FrameTypeIndex () const
 Returns the frame line type index.
.
Standard_EXPORT Standard_Integer FrameWidthIndex () const
 Returns the frame line thickness index.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Member Functions

virtual Standard_EXPORT void Draw (const Handle(Graphic2d_Drawer)&aDrawer, const Standard_Boolean Reset)
 Drawn the last Undrawn primitives managed by the
graphic object <me> in the drawer <adrawer>.
.
virtual Standard_EXPORT void Draw (const Handle(Graphic2d_Drawer)&aDrawer, const Handle(Graphic2d_Primitive)&aPrimitive)
 Drawn a primitive managed by the
graphic object <me> in the drawer <adrawer>.
Called by the method Graphic2d_View::Update (aPrimitive)
.
virtual Standard_EXPORT Standard_Boolean Pick (const Standard_Real X, const Standard_Real Y, const Standard_Real aPrecision, const Handle(Graphic2d_Drawer)&aDrawer)
 Returns Standard_True if the graphic object <me>
is picked, Standard_False if not.
Called by the method Graphic2d_View::Pick
.
virtual Standard_EXPORT Standard_Integer BasePriority () const
 Returns the min usable absolute priority of the
"hiding" graphic object.
.
Standard_EXPORT void TransformMinMax (const gp_GTrsf2d &aTrsf, Standard_Real &Minx, Standard_Real &Maxx, Standard_Real &Miny, Standard_Real &Maxy) const
 Returns the transformed min max values of the frame <me>.
.

Private Attributes

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

Constructor & Destructor Documentation

Standard_EXPORT Graphic2d_HidingGraphicObject::Graphic2d_HidingGraphicObject const Handle(Graphic2d_View)&  aView,
const Graphic2d_Array1OfVertex aFrame
 

Standard_EXPORT Graphic2d_HidingGraphicObject::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
 


Member Function Documentation

virtual Standard_EXPORT Standard_Integer Graphic2d_HidingGraphicObject::BasePriority  )  const [private, virtual]
 

Reimplemented from Graphic2d_GraphicObject.

virtual Standard_EXPORT void Graphic2d_HidingGraphicObject::Draw const Handle(Graphic2d_Drawer)&  aDrawer,
const Handle(Graphic2d_Primitive)&  aPrimitive
[private, virtual]
 

Reimplemented from Graphic2d_GraphicObject.

virtual Standard_EXPORT void Graphic2d_HidingGraphicObject::Draw const Handle(Graphic2d_Drawer)&  aDrawer,
const Standard_Boolean  Reset
[private, virtual]
 

Reimplemented from Graphic2d_GraphicObject.

Standard_EXPORT Graphic2d_TypeOfFrame Graphic2d_HidingGraphicObject::Frame Graphic2d_Array1OfVertex aFrame  )  const
 

Standard_EXPORT Standard_Integer Graphic2d_HidingGraphicObject::FrameColorIndex  )  const
 

Standard_EXPORT Standard_Boolean Graphic2d_HidingGraphicObject::FrameMinMax Quantity_Length &  Minx,
Quantity_Length &  Maxx,
Quantity_Length &  Miny,
Quantity_Length &  Maxy
const
 

Standard_EXPORT Standard_Integer Graphic2d_HidingGraphicObject::FrameTypeIndex  )  const
 

Standard_EXPORT Standard_Integer Graphic2d_HidingGraphicObject::FrameWidthIndex  )  const
 

Standard_EXPORT const Graphic2d_HidingGraphicObject::Handle Standard_Type   )  const
 

Reimplemented from Graphic2d_GraphicObject.

Standard_EXPORT Standard_Integer Graphic2d_HidingGraphicObject::HidingColorIndex  )  const
 

virtual Standard_EXPORT Standard_Integer Graphic2d_HidingGraphicObject::MaxPriority  )  const [virtual]
 

Reimplemented from Graphic2d_GraphicObject.

virtual Standard_EXPORT Standard_Boolean Graphic2d_HidingGraphicObject::MinMax Quantity_Length &  Minx,
Quantity_Length &  Maxx,
Quantity_Length &  Miny,
Quantity_Length &  Maxy
const [virtual]
 

Reimplemented from Graphic2d_GraphicObject.

virtual Standard_EXPORT Standard_Boolean Graphic2d_HidingGraphicObject::Pick const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  aPrecision,
const Handle(Graphic2d_Drawer)&  aDrawer
[private, virtual]
 

Reimplemented from Graphic2d_GraphicObject.

Standard_EXPORT void Graphic2d_HidingGraphicObject::SetFrame const Graphic2d_TypeOfFrame  aFrameType,
const Quantity_Length  aMargin1 = 0.0,
const Quantity_Length  aMargin2 = 0.0
 

Standard_EXPORT void Graphic2d_HidingGraphicObject::SetFrame const Graphic2d_Array1OfVertex aFrame  ) 
 

Standard_EXPORT void Graphic2d_HidingGraphicObject::SetFrameColorIndex const Standard_Integer  anIndex = 1  ) 
 

Standard_EXPORT void Graphic2d_HidingGraphicObject::SetFrameTypeIndex const Standard_Integer  anIndex = 0  ) 
 

Standard_EXPORT void Graphic2d_HidingGraphicObject::SetFrameWidthIndex const Standard_Integer  anIndex = 0  ) 
 

Standard_EXPORT void Graphic2d_HidingGraphicObject::SetHidingColorIndex const Standard_Integer  anIndex = 0  ) 
 

Standard_EXPORT void Graphic2d_HidingGraphicObject::TransformMinMax const gp_GTrsf2d &  aTrsf,
Standard_Real &  Minx,
Standard_Real &  Maxx,
Standard_Real &  Miny,
Standard_Real &  Maxy
const [private]
 


Field Documentation

Handle_Graphic2d_HArray1OfVertex Graphic2d_HidingGraphicObject::myFrame [private]
 

Standard_Integer Graphic2d_HidingGraphicObject::myFrameColorIndex [private]
 

Quantity_Length Graphic2d_HidingGraphicObject::myFrameMargin1 [private]
 

Quantity_Length Graphic2d_HidingGraphicObject::myFrameMargin2 [private]
 

Standard_Integer Graphic2d_HidingGraphicObject::myFrameTypeIndex [private]
 

Standard_Integer Graphic2d_HidingGraphicObject::myFrameWidthIndex [private]
 

Standard_Integer Graphic2d_HidingGraphicObject::myHidingColorIndex [private]
 

Standard_Boolean Graphic2d_HidingGraphicObject::myIsComputed [private]
 

Graphic2d_TypeOfFrame Graphic2d_HidingGraphicObject::myTypeOfFrame [private]
 

Quantity_Length Graphic2d_HidingGraphicObject::myXmax [private]
 

Quantity_Length Graphic2d_HidingGraphicObject::myXmin [private]
 

Quantity_Length Graphic2d_HidingGraphicObject::myYmax [private]
 

Quantity_Length Graphic2d_HidingGraphicObject::myYmin [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:55:32 2008 for OpenCASCADE by  doxygen 1.4.1