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

Visualization
TKV2d
Graphic2d


Graphic2d_SetOfPolylines Class Reference

The primitive SetOfPolylines
Warning: This primitive must be use as possible for to insure
that the sets is drawn correctly when the line type or
line width attrib is not SOLID and 1 pixel for the set.
NOTE: than the method PickedIndex() permits to known
the last picked polyline and segment in the set.
.

#include <Graphic2d_SetOfPolylines.hxx>

Inheritance diagram for Graphic2d_SetOfPolylines:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT Graphic2d_SetOfPolylines (const Handle(Graphic2d_GraphicObject)&aGraphicObject)
 Creates an empty set of polylines in the graphic
object <agraphicobject>.
.
Standard_EXPORT void Add (const Quantity_Length X, const Quantity_Length Y, const Standard_Boolean NewPolyline=Standard_False)
 Add a point in the current polyline of the set
or creates a new one when <newpolyline> flag is TRUE.
.
Standard_EXPORT void Add (const Quantity_Length X1, const Quantity_Length Y1, const Quantity_Length X2, const Quantity_Length Y2)
 Add a segment in the set to one of polyline
which has the last point identical to one of the segment
or creates a new polyline in the sets with the 2 segment points.
The first point is <x1>, <y1>.
The second point is <x2>, <y2>.
.
Standard_EXPORT Standard_Integer Length () const
 Returns the number of polylines in the set.
.
Standard_EXPORT Standard_Integer Length (const Standard_Integer aPrank) const
 Returns the number of points of the polylines
of rank <aprank>.
Trigger: Raises OutOfRange if <aprank> is <1 or >Length()
.
Standard_EXPORT void Values (const Standard_Integer aPrank, const Standard_Integer aVrank, Quantity_Length &X, Quantity_Length &Y) const
 Returns the point of rank <avrank>
from the polyline of rank <aprank>.
Trigger: Raises OutOfRange if <aprank> is <1 or >Length()
or if <avrank> is <1 or >Length(<aPrank>)
.
virtual Standard_EXPORT void Save (Aspect_FStream &aFStream) const
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Protected Member Functions

Standard_EXPORT void Draw (const Handle(Graphic2d_Drawer)&aDrawer)
 Draws the set of polylines <me>.
.
Standard_EXPORT Standard_Boolean Pick (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal aPrecision, const Handle(Graphic2d_Drawer)&aDrawer)
 Returns Standard_True if one point of the set <me>
is picked, Standard_False if not.
Warning: The PickIndex() method returns the rank of the picked
polyline point if any under the format :
(<aprank> << 16) | <avrank>.
.

Private Attributes

Graphic2d_SequenceOfPolyline myPolylines

Constructor & Destructor Documentation

Standard_EXPORT Graphic2d_SetOfPolylines::Graphic2d_SetOfPolylines const Handle(Graphic2d_GraphicObject)&  aGraphicObject  ) 
 


Member Function Documentation

Standard_EXPORT void Graphic2d_SetOfPolylines::Add const Quantity_Length  X1,
const Quantity_Length  Y1,
const Quantity_Length  X2,
const Quantity_Length  Y2
 

Standard_EXPORT void Graphic2d_SetOfPolylines::Add const Quantity_Length  X,
const Quantity_Length  Y,
const Standard_Boolean  NewPolyline = Standard_False
 

Standard_EXPORT void Graphic2d_SetOfPolylines::Draw const Handle(Graphic2d_Drawer)&  aDrawer  )  [protected, virtual]
 

Implements Graphic2d_Primitive.

Standard_EXPORT const Graphic2d_SetOfPolylines::Handle Standard_Type   )  const
 

Reimplemented from Graphic2d_Line.

Standard_EXPORT Standard_Integer Graphic2d_SetOfPolylines::Length const Standard_Integer  aPrank  )  const
 

Standard_EXPORT Standard_Integer Graphic2d_SetOfPolylines::Length  )  const
 

Standard_EXPORT Standard_Boolean Graphic2d_SetOfPolylines::Pick const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  aPrecision,
const Handle(Graphic2d_Drawer)&  aDrawer
[protected, virtual]
 

Implements Graphic2d_Primitive.

virtual Standard_EXPORT void Graphic2d_SetOfPolylines::Save Aspect_FStream aFStream  )  const [virtual]
 

Reimplemented from Graphic2d_Line.

Standard_EXPORT void Graphic2d_SetOfPolylines::Values const Standard_Integer  aPrank,
const Standard_Integer  aVrank,
Quantity_Length &  X,
Quantity_Length &  Y
const
 


Field Documentation

Graphic2d_SequenceOfPolyline Graphic2d_SetOfPolylines::myPolylines [private]
 


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