# Visualization
TKV2d
Graphic2d

# 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:

[legend]

## Public Member Functions

Standard_EXPORT 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. .
Standard_EXPORT 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. .
Standard_EXPORT 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 .
Standard_EXPORT 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 .
Standard_EXPORT void | SetInteriorPattern (const Standard_Integer anIndex)
| Defines the pattern for closed lines. Warning: The type of polygon filling must be : Graphic2d_TOPF_PATTERNED .
Standard_EXPORT void | SetTypeOfPolygonFilling (const Graphic2d_TypeOfPolygonFilling aType)
| Defines the pattern for closed lines. TypeOfPolygonFilling is : - Graphic2d_TOPF_EMPTY - Graphic2d_TOPF_FILLED - Graphic2d_TOPF_PATTERNED .
Standard_EXPORT Standard_Integer | InteriorColorIndex () const
| Returns the interior color used. .
Standard_EXPORT Standard_Integer | InteriorPattern () const
| Returns the interior pattern used. .
Standard_EXPORT Graphic2d_TypeOfPolygonFilling | TypeOfPolygonFilling () const
| Returns the type of polygon filling used. .
Standard_EXPORT Standard_Integer | TypeIndex () const
| Returns the line type index used. .
Standard_EXPORT Standard_Integer | WidthIndex () const
| Returns the line width index used. .
Standard_EXPORT void | Save (Aspect_FStream &aFStream) const
Standard_EXPORT void | Retrieve (Aspect_IFStream &anIFStream)
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Member Functions

Standard_EXPORT | Graphic2d_Line (const Handle(Graphic2d_GraphicObject)&aGraphicObject)
| Defines a line with the following default values : - 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) .
Standard_EXPORT void | DrawLineAttrib (const Handle(Graphic2d_Drawer)&aDrawer) const
| Sets line attributes and polyline attributes in the drawer <adrawer>. .
Standard_EXPORT void | DrawMarkerAttrib (const Handle(Graphic2d_Drawer)&aDrawer) const
| Sets marker attributes -in the drawer <adrawer>. .

## Static Protected Member Functions

static Standard_EXPORT 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_EXPORT 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

## Private Attributes

Standard_Integer | myWidthIndex
Standard_Integer | myTypeIndex
Standard_Integer | myPatternIndex
Standard_Integer | myInteriorColorIndex

## Constructor & Destructor Documentation

Standard_EXPORT Graphic2d_Line::Graphic2d_Line | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject | ) | `[protected]`

## Member Function Documentation

Standard_EXPORT void Graphic2d_Line::DrawLineAttrib | ( | const Handle(Graphic2d_Drawer)& | aDrawer | ) | const`[protected]`

Standard_EXPORT void Graphic2d_Line::DrawMarkerAttrib | ( | const Handle(Graphic2d_Drawer)& | aDrawer | ) | const`[protected]`

Standard_EXPORT const Graphic2d_Line::Handle | ( | Standard_Type |  | ) | const

Reimplemented from Graphic2d_Primitive.

Reimplemented in GGraphic2d_Curve, GGraphic2d_SetOfCurves, Graphic2d_Circle, Graphic2d_CircleMarker, Graphic2d_Ellips, Graphic2d_EllipsMarker, Graphic2d_InfiniteLine, Graphic2d_Marker, Graphic2d_Polyline, Graphic2d_PolylineMarker, Graphic2d_Segment, Graphic2d_SetOfMarkers, Graphic2d_SetOfPolylines, Graphic2d_SetOfSegments, Graphic2d_VectorialMarker, Prs2d_Angle, Prs2d_Angularity, Prs2d_Arrow, Prs2d_Axis, Prs2d_Circularity, Prs2d_Concentric, Prs2d_Cylindric, Prs2d_Diameter, Prs2d_Dimension, Prs2d_DrawSymbol, Prs2d_Flatness, Prs2d_Length, Prs2d_LineProfile, Prs2d_Parallelism, Prs2d_Perpendicular, Prs2d_Point, Prs2d_Position, Prs2d_Radius, Prs2d_RadiusIndep, Prs2d_Repere, Prs2d_Straightness, Prs2d_SurfProfile, Prs2d_SymCircular, Prs2d_Symmetry, Prs2d_SymTotal, Prs2d_Taper, Prs2d_Tolerance, and Prs2d_ToleranceFrame.

Standard_EXPORT Standard_Integer Graphic2d_Line::InteriorColorIndex | ( |  | ) | const

Standard_EXPORT Standard_Integer Graphic2d_Line::InteriorPattern | ( |  | ) | const

static Standard_EXPORT 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_EXPORT 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]`

Standard_EXPORT void Graphic2d_Line::Retrieve | ( | Aspect_IFStream & | anIFStream | ) |

Standard_EXPORT void Graphic2d_Line::Save | ( | Aspect_FStream & | aFStream | ) | const`[virtual]`

Implements Graphic2d_Primitive.

Reimplemented in GGraphic2d_Curve, GGraphic2d_SetOfCurves, Graphic2d_Circle, Graphic2d_CircleMarker, Graphic2d_Ellips, Graphic2d_EllipsMarker, Graphic2d_InfiniteLine, Graphic2d_Marker, Graphic2d_Polyline, Graphic2d_PolylineMarker, Graphic2d_Segment, Graphic2d_SetOfMarkers, Graphic2d_SetOfPolylines, Graphic2d_SetOfSegments, Prs2d_Angle, Prs2d_Angularity, Prs2d_Arrow, Prs2d_Axis, Prs2d_Circularity, Prs2d_Concentric, Prs2d_Cylindric, Prs2d_Diameter, Prs2d_DrawSymbol, Prs2d_Flatness, Prs2d_Length, Prs2d_LineProfile, Prs2d_Parallelism, Prs2d_Perpendicular, Prs2d_Point, Prs2d_Position, Prs2d_Radius, Prs2d_RadiusIndep, Prs2d_Repere, Prs2d_Straightness, Prs2d_SurfProfile, Prs2d_SymCircular, Prs2d_Symmetry, Prs2d_SymTotal, Prs2d_Taper, and Prs2d_ToleranceFrame.

Standard_EXPORT void Graphic2d_Line::SetDrawEdge | ( | const Standard_Boolean | aDraw | ) |

Standard_EXPORT void Graphic2d_Line::SetInteriorColorIndex | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT void Graphic2d_Line::SetInteriorPattern | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT void Graphic2d_Line::SetTypeIndex | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT void Graphic2d_Line::SetTypeOfPolygonFilling | ( | const Graphic2d_TypeOfPolygonFilling | aType | ) |

Standard_EXPORT void Graphic2d_Line::SetWidthIndex | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT Standard_Integer Graphic2d_Line::TypeIndex | ( |  | ) | const

Standard_EXPORT Graphic2d_TypeOfPolygonFilling Graphic2d_Line::TypeOfPolygonFilling | ( |  | ) | const

Standard_EXPORT Standard_Integer Graphic2d_Line::WidthIndex | ( |  | ) | const

## Field Documentation

Standard_Boolean Graphic2d_Line::myDrawEdge `[protected]`

Standard_Integer Graphic2d_Line::myInteriorColorIndex `[private]`

Standard_Integer Graphic2d_Line::myPatternIndex `[private]`

Standard_Integer Graphic2d_Line::myTypeIndex `[private]`

Graphic2d_TypeOfPolygonFilling Graphic2d_Line::myTypeOfPolygonFilling `[protected]`

Standard_Integer Graphic2d_Line::myWidthIndex `[private]`

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

- Graphic2d_Line.hxx