Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Protected Member Functions
Graphic2d_Polyline Class Reference

The primitive Polyline

#include <Graphic2d_Polyline.hxx>

Inheritance diagram for Graphic2d_Polyline:
Inheritance graph
[legend]

Public Member Functions

 Graphic2d_Polyline (const Handle< Graphic2d_GraphicObject > &aGraphicObject, const Graphic2d_Array1OfVertex &aListVertex)
 Creates a polyline.
Warning: Raises an error if the length of the polyline
is less than 2 points.

 Graphic2d_Polyline (const Handle< Graphic2d_GraphicObject > &aGraphicObject, const TColStd_Array1OfReal &aListX, const TColStd_Array1OfReal &aListY)
 Creates a polyline.
Warning: Raises an error if the length of the polyline
is less than 2 points or if length of <aListX>
is not equal to length of <aListY>.

Standard_Integer Length () const
 Returns the number of points of the line.

void Values (const Standard_Integer aRank, Quantity_Length &X, Quantity_Length &Y) const
 Returns the point of rank <aRank> from the line.

virtual void Save (Aspect_FStream &aFStream) const

Static Public Member Functions

static void Retrieve (Aspect_IFStream &anIFStream, const Handle< Graphic2d_GraphicObject > &aGraphicObject)

Protected Member Functions

void Draw (const Handle< Graphic2d_Drawer > &aDrawer)
 Draws the polyline <me>.

virtual void DrawElement (const Handle< Graphic2d_Drawer > &aDrawer, const Standard_Integer anIndex)
 Draws edge <anIndex> of the polyline <me>.

virtual void DrawVertex (const Handle< Graphic2d_Drawer > &aDrawer, const Standard_Integer anIndex)
 Draws vertex <anIndex> of the polyline <me>.

Standard_Boolean Pick (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal aPrecision, const Handle< Graphic2d_Drawer > &aDrawer)
 Returns Standard_True if the polyline <me> is picked,
Standard_False if not.
Warning: The method PickIndex() returns the last picked point
rank of the line or 0 if picking occurs inside
the filled line.


Constructor & Destructor Documentation


Member Function Documentation

void Graphic2d_Polyline::Draw ( const Handle< Graphic2d_Drawer > &  aDrawer) [protected, virtual]

Implements Graphic2d_Primitive.

virtual void Graphic2d_Polyline::DrawElement ( const Handle< Graphic2d_Drawer > &  aDrawer,
const Standard_Integer  anIndex 
) [protected, virtual]

Reimplemented from Graphic2d_Primitive.

virtual void Graphic2d_Polyline::DrawVertex ( const Handle< Graphic2d_Drawer > &  aDrawer,
const Standard_Integer  anIndex 
) [protected, virtual]

Reimplemented from Graphic2d_Primitive.

Implements Graphic2d_Primitive.

static void Graphic2d_Polyline::Retrieve ( Aspect_IFStream anIFStream,
const Handle< Graphic2d_GraphicObject > &  aGraphicObject 
) [static]
virtual void Graphic2d_Polyline::Save ( Aspect_FStream aFStream) const [virtual]

Reimplemented from Graphic2d_Line.


The documentation for this class was generated from the following file: