Open CASCADE Technology
6.5.4
|
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>
Public Member Functions | |
Graphic2d_SetOfPolylines (const Handle< Graphic2d_GraphicObject > &aGraphicObject) | |
Creates an empty set of polylines in the graphic object <aGraphicObject>. | |
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. | |
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_Integer | Length () const |
Returns the number of polylines in the set. | |
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() | |
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 void | Save (Aspect_FStream &aFStream) const |
Protected Member Functions | |
void | Draw (const Handle< Graphic2d_Drawer > &aDrawer) |
Draws the set of polylines <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 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>. |
Graphic2d_SetOfPolylines::Graphic2d_SetOfPolylines | ( | const Handle< Graphic2d_GraphicObject > & | aGraphicObject | ) |
void Graphic2d_SetOfPolylines::Add | ( | const Quantity_Length | X, |
const Quantity_Length | Y, | ||
const Standard_Boolean | NewPolyline = Standard_False |
||
) |
void Graphic2d_SetOfPolylines::Add | ( | const Quantity_Length | X1, |
const Quantity_Length | Y1, | ||
const Quantity_Length | X2, | ||
const Quantity_Length | Y2 | ||
) |
void Graphic2d_SetOfPolylines::Draw | ( | const Handle< Graphic2d_Drawer > & | aDrawer | ) | [protected, virtual] |
Implements Graphic2d_Primitive.
Standard_Integer Graphic2d_SetOfPolylines::Length | ( | const Standard_Integer | aPrank | ) | const |
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 void Graphic2d_SetOfPolylines::Save | ( | Aspect_FStream & | aFStream | ) | const [virtual] |
Reimplemented from Graphic2d_Line.
void Graphic2d_SetOfPolylines::Values | ( | const Standard_Integer | aPrank, |
const Standard_Integer | aVrank, | ||
Quantity_Length & | X, | ||
Quantity_Length & | Y | ||
) | const |