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_Segment Class Reference

The primitive Segment

#include <Graphic2d_Segment.hxx>

Inheritance diagram for Graphic2d_Segment:
Inheritance graph
[legend]

Public Member Functions

 Graphic2d_Segment (const Handle< Graphic2d_GraphicObject > &aGraphicObject, const Quantity_Length X1, const Quantity_Length Y1, const Quantity_Length X2, const Quantity_Length Y2)
 Creates a segment in the graphic object <aGraphicObject>.
The first point is <X1>, <Y1>.
The second point is <X2>, <Y2>.
Warning: Raises SegmentDefinitionError if the
first point and the second point are identical.

void FirstPoint (Quantity_Length &X, Quantity_Length &Y) const
 returns the coordinates of the first point of the segment

void SecondPoint (Quantity_Length &X, Quantity_Length &Y) const
 returns the coordinates of the second point of the segment

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 segment <me>.

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

virtual void DrawVertex (const Handle< Graphic2d_Drawer > &aDrawer, const Standard_Integer anIndex)
 Draws vertex <anIndex> of the segment <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 segment <me> is picked,
Standard_False if not.


Constructor & Destructor Documentation


Member Function Documentation

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

Implements Graphic2d_Primitive.

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

Reimplemented from Graphic2d_Primitive.

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

Reimplemented from Graphic2d_Primitive.

Implements Graphic2d_Primitive.

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

Reimplemented from Graphic2d_Line.


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