// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Graphic2d_Line_HeaderFile #define _Graphic2d_Line_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Line_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Graphic2d_TypeOfPolygonFilling_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Graphic2d_Primitive_HeaderFile #include #endif #ifndef _Handle_Graphic2d_GraphicObject_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Drawer_HeaderFile #include #endif #ifndef _Standard_ShortReal_HeaderFile #include #endif #ifndef _Aspect_FStream_HeaderFile #include #endif #ifndef _Aspect_IFStream_HeaderFile #include #endif class Graphic2d_GraphicObject; class Graphic2d_Drawer; class TShort_Array1OfShortReal; //! Groups all the primitives which behaves like
//! geometrical lines.
//! for example: Polyline, Circle ...
class Graphic2d_Line : public Graphic2d_Primitive { public: //! 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 SetWidthIndex(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 SetTypeIndex(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 SetInteriorColorIndex(const Standard_Integer anIndex) ; //! 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 SetDrawEdge(const Standard_Boolean aDraw) ; //! Defines the pattern for closed lines.
//! Warning: The type of polygon filling must be :
//! Graphic2d_TOPF_PATTERNED
Standard_EXPORT void SetInteriorPattern(const Standard_Integer anIndex) ; //! Defines the pattern for closed lines.
//! TypeOfPolygonFilling is :
//! - Graphic2d_TOPF_EMPTY
//! - Graphic2d_TOPF_FILLED
//! - Graphic2d_TOPF_PATTERNED
Standard_EXPORT void SetTypeOfPolygonFilling(const Graphic2d_TypeOfPolygonFilling aType) ; //! Returns the interior color used.
Standard_EXPORT Standard_Integer InteriorColorIndex() const; //! Returns the interior pattern used.
Standard_EXPORT Standard_Integer InteriorPattern() const; //! Returns the type of polygon filling used.
Standard_EXPORT Graphic2d_TypeOfPolygonFilling TypeOfPolygonFilling() const; //! Returns the line type index used.
Standard_EXPORT Standard_Integer TypeIndex() const; //! Returns the line width index used.
Standard_EXPORT Standard_Integer WidthIndex() const; Standard_EXPORT void Save(Aspect_FStream& aFStream) const; Standard_EXPORT void Retrieve(Aspect_IFStream& anIFStream) ; DEFINE_STANDARD_RTTI(Graphic2d_Line) protected: //! 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 Graphic2d_Line(const Handle(Graphic2d_GraphicObject)& aGraphicObject); //! Sets line attributes and polyline attributes
//! in the drawer .
Standard_EXPORT void DrawLineAttrib(const Handle(Graphic2d_Drawer)& aDrawer) const; //! Sets marker attributes -in the drawer .
Standard_EXPORT void DrawMarkerAttrib(const Handle(Graphic2d_Drawer)& aDrawer) const; //! Returns Standard_True if (, ) belongs to
//! the segment (, ), (, ).
Standard_EXPORT 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 (, ) is inside the
//! wire defined by the array and .
Standard_EXPORT static Standard_Boolean IsIn(const Standard_ShortReal aX,const Standard_ShortReal aY,const TShort_Array1OfShortReal& X,const TShort_Array1OfShortReal& Y,const Standard_ShortReal aPrecision) ; Graphic2d_TypeOfPolygonFilling myTypeOfPolygonFilling; Standard_Boolean myDrawEdge; private: Standard_Integer myWidthIndex; Standard_Integer myTypeIndex; Standard_Integer myPatternIndex; Standard_Integer myInteriorColorIndex; }; // other Inline functions and methods (like "C++: function call" methods) #endif