|
Open CASCADE Technology
6.5.4
|
The primitive Segment
#include <Graphic2d_Segment.hxx>

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. | |
| Graphic2d_Segment::Graphic2d_Segment | ( | const Handle< Graphic2d_GraphicObject > & | aGraphicObject, |
| const Quantity_Length | X1, | ||
| const Quantity_Length | Y1, | ||
| const Quantity_Length | X2, | ||
| const Quantity_Length | Y2 | ||
| ) |
| 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.
| void Graphic2d_Segment::FirstPoint | ( | Quantity_Length & | X, |
| Quantity_Length & | Y | ||
| ) | const |
| Standard_Boolean Graphic2d_Segment::Pick | ( | const Standard_ShortReal | X, |
| const Standard_ShortReal | Y, | ||
| const Standard_ShortReal | aPrecision, | ||
| const Handle< Graphic2d_Drawer > & | aDrawer | ||
| ) | [protected, virtual] |
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.
| void Graphic2d_Segment::SecondPoint | ( | Quantity_Length & | X, |
| Quantity_Length & | Y | ||
| ) | const |
1.8.0