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

Groups all the primitives which behaves like
geometrical lines.
for example: Polyline, Circle ...

#include <Graphic2d_Line.hxx>

Inheritance diagram for Graphic2d_Line:
Inheritance graph
[legend]

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

Constructor & Destructor Documentation

  • Color Index = 1 (the first user defined color)
  • Width Index = 0 (default 1 pixel width)
  • Type Index = 0 (default solid line)
  • Draw Edge = Standard_True
  • Type Of Polygon Filling = Graphic2d_TOPF_EMPTY
  • Pattern Index = 0 (default solid polygon filling)
  • Interior Color Index = 1 (the first user defined color)

Member Function Documentation

void Graphic2d_Line::DrawLineAttrib ( const Handle< Graphic2d_Drawer > &  aDrawer) const [protected]
void Graphic2d_Line::DrawMarkerAttrib ( const Handle< Graphic2d_Drawer > &  aDrawer) const [protected]
void Graphic2d_Line::Save ( Aspect_FStream aFStream) const [virtual]
  • Graphic2d_TOPF_EMPTY
  • Graphic2d_TOPF_FILLED
  • Graphic2d_TOPF_PATTERNED

Field Documentation


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