Open CASCADE Technology
6.5.4
|
Groups all the primitives which behaves like
geometrical lines.
for example: Polyline, Circle ...
#include <Graphic2d_Line.hxx>
Public Member Functions | |
void | SetWidthIndex (const Standard_Integer anIndex) |
Defines the index, in the width map, of the line width. Warning: Note that the index 0 can be undefined as a WidthMapEntry, in this case the default line width of 1 pixel is taken. | |
void | SetTypeIndex (const Standard_Integer anIndex) |
Defines the index, in the type map, of the line type. Warning: Note that the index 0 can be undefined as a TypeMapEntry, in this case the default line type SOLID is taken. | |
void | SetInteriorColorIndex (const Standard_Integer anIndex) |
Defines the index, in the color map, of the interior color. Warning: The type of polygon filling must be : Graphic2d_TOPF_FILLED | |
void | SetDrawEdge (const Standard_Boolean aDraw) |
Defines if the edges are drawn or not. Warning: The type of polygon filling must be : Graphic2d_TOPF_FILLED or Graphic2d_TOPF_PATTERNED | |
void | SetInteriorPattern (const Standard_Integer anIndex) |
Defines the pattern for closed lines. Warning: The type of polygon filling must be : Graphic2d_TOPF_PATTERNED | |
void | SetTypeOfPolygonFilling (const Graphic2d_TypeOfPolygonFilling aType) |
Defines the pattern for closed lines. TypeOfPolygonFilling is : | |
Standard_Integer | InteriorColorIndex () const |
Returns the interior color used. | |
Standard_Integer | InteriorPattern () const |
Returns the interior pattern used. | |
Graphic2d_TypeOfPolygonFilling | TypeOfPolygonFilling () const |
Returns the type of polygon filling used. | |
Standard_Integer | TypeIndex () const |
Returns the line type index used. | |
Standard_Integer | WidthIndex () const |
Returns the line width index used. | |
void | Save (Aspect_FStream &aFStream) const |
void | Retrieve (Aspect_IFStream &anIFStream) |
Protected Member Functions | |
Graphic2d_Line (const Handle< Graphic2d_GraphicObject > &aGraphicObject) | |
Defines a line with the following default values : | |
void | DrawLineAttrib (const Handle< Graphic2d_Drawer > &aDrawer) const |
Sets line attributes and polyline attributes in the drawer <aDrawer>. | |
void | DrawMarkerAttrib (const Handle< Graphic2d_Drawer > &aDrawer) const |
Sets marker attributes -in the drawer <aDrawer>. | |
Static Protected Member Functions | |
static Standard_Boolean | IsOn (const Standard_ShortReal aX, const Standard_ShortReal aY, const Standard_ShortReal aX1, const Standard_ShortReal aY1, const Standard_ShortReal aX2, const Standard_ShortReal aY2, const Standard_ShortReal aPrecision) |
Returns Standard_True if (<aX>, <aY>) belongs to the segment (<aX1>, <aY1>), (<aX2>, <aY2>). | |
static Standard_Boolean | IsIn (const Standard_ShortReal aX, const Standard_ShortReal aY, const TShort_Array1OfShortReal &X, const TShort_Array1OfShortReal &Y, const Standard_ShortReal aPrecision) |
Returns Standard_True if (<aX>, <aY>) is inside the wire defined by the array <X> and <Y>. | |
Protected Attributes | |
Graphic2d_TypeOfPolygonFilling | myTypeOfPolygonFilling |
Standard_Boolean | myDrawEdge |
Graphic2d_Line::Graphic2d_Line | ( | const Handle< Graphic2d_GraphicObject > & | aGraphicObject | ) | [protected] |
void Graphic2d_Line::DrawLineAttrib | ( | const Handle< Graphic2d_Drawer > & | aDrawer | ) | const [protected] |
void Graphic2d_Line::DrawMarkerAttrib | ( | const Handle< Graphic2d_Drawer > & | aDrawer | ) | const [protected] |
static Standard_Boolean Graphic2d_Line::IsIn | ( | const Standard_ShortReal | aX, |
const Standard_ShortReal | aY, | ||
const TShort_Array1OfShortReal & | X, | ||
const TShort_Array1OfShortReal & | Y, | ||
const Standard_ShortReal | aPrecision | ||
) | [static, protected] |
static Standard_Boolean Graphic2d_Line::IsOn | ( | const Standard_ShortReal | aX, |
const Standard_ShortReal | aY, | ||
const Standard_ShortReal | aX1, | ||
const Standard_ShortReal | aY1, | ||
const Standard_ShortReal | aX2, | ||
const Standard_ShortReal | aY2, | ||
const Standard_ShortReal | aPrecision | ||
) | [static, protected] |
void Graphic2d_Line::Retrieve | ( | Aspect_IFStream & | anIFStream | ) |
void Graphic2d_Line::Save | ( | Aspect_FStream & | aFStream | ) | const [virtual] |
Implements Graphic2d_Primitive.
Reimplemented in Graphic2d_SetOfMarkers, Prs2d_RadiusIndep, Graphic2d_CircleMarker, Graphic2d_Circle, Graphic2d_PolylineMarker, Prs2d_Axis, Graphic2d_SetOfPolylines, Prs2d_Length, GGraphic2d_SetOfCurves, Graphic2d_EllipsMarker, Prs2d_ToleranceFrame, Graphic2d_SetOfSegments, Prs2d_Point, Prs2d_Arrow, Graphic2d_Polyline, Prs2d_Angle, Prs2d_Radius, Prs2d_Diameter, Graphic2d_Ellips, GGraphic2d_Curve, Graphic2d_Marker, Graphic2d_Segment, Prs2d_Repere, Graphic2d_InfiniteLine, Prs2d_DrawSymbol, Prs2d_Straightness, Prs2d_Flatness, Prs2d_Circularity, Prs2d_Cylindric, Prs2d_LineProfile, Prs2d_SurfProfile, Prs2d_Parallelism, Prs2d_Perpendicular, Prs2d_Angularity, Prs2d_Position, Prs2d_Concentric, Prs2d_Symmetry, Prs2d_SymTotal, Prs2d_SymCircular, and Prs2d_Taper.
void Graphic2d_Line::SetTypeIndex | ( | const Standard_Integer | anIndex | ) |
void Graphic2d_Line::SetWidthIndex | ( | const Standard_Integer | anIndex | ) |
Standard_Integer Graphic2d_Line::TypeIndex | ( | ) | const |
Standard_Integer Graphic2d_Line::WidthIndex | ( | ) | const |
Standard_Boolean Graphic2d_Line::myDrawEdge [protected] |