Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions
Aspect_Driver Class Referenceabstract

Defines the common behaviour of the output driver.
Warning: Permits to defines polyline,polygon,marker and text attributes in relation
with the SINGLE primitives DrawPolyline(),DrawPolygon(),....
or the INCREMENTAL primitives BeginPolyline(),BeginPolygon(),...
or the SET of primitives BeginArcs(),BeginMarkers(),...

NOTE that :
The incremental primitives are interesting to used because
no more arrays are necessary to fill it.
The set of primitives are interesting to used because this
increase the drawing performances.
More...

#include <Aspect_Driver.hxx>

Inheritance diagram for Aspect_Driver:
Inheritance graph
[legend]

Public Member Functions

virtual void EndDraw (const Standard_Boolean Synchronize=Standard_False)=0
 Flush all graphics and Wait after up to date
More...
 
void SetColorMap (const Handle< Aspect_ColorMap > &aColorMap)
 
void SetTypeMap (const Handle< Aspect_TypeMap > &aTypeMap)
 
void SetWidthMap (const Handle< Aspect_WidthMap > &aWidthMap)
 
void SetFontMap (const Handle< Aspect_FontMap > &aFontMap)
 Sets the current font map to this driver and Enable/Disable
this driver to use MDTV fonts instead system fonts.
More...
 
void SetMarkMap (const Handle< Aspect_MarkMap > &aMarkMap)
 
virtual void SetLineAttrib (const Standard_Integer ColorIndex, const Standard_Integer TypeIndex, const Standard_Integer WidthIndex)=0
 
virtual void SetTextAttrib (const Standard_Integer ColorIndex, const Standard_Integer FontIndex)=0
 
virtual void SetTextAttrib (const Standard_Integer ColorIndex, const Standard_Integer FontIndex, const Quantity_PlaneAngle aSlant, const Quantity_Factor aHScale, const Quantity_Factor aWScale, const Standard_Boolean isUnderlined=Standard_False)=0
 
virtual void SetPolyAttrib (const Standard_Integer ColorIndex, const Standard_Integer TileIndex, const Standard_Boolean DrawEdge=Standard_False)=0
 
virtual void SetMarkerAttrib (const Standard_Integer ColorIndex, const Standard_Integer WidthIndex, const Standard_Boolean FillMarker=Standard_False)=0
 
virtual Standard_Boolean IsKnownImage (const Handle< Standard_Transient > &anImage)=0
 
virtual Standard_Boolean SizeOfImageFile (const Standard_CString anImageFile, Standard_Integer &aWidth, Standard_Integer &aHeight) const =0
 
virtual void ClearImage (const Handle< Standard_Transient > &anImageId)=0
 
virtual void ClearImageFile (const Standard_CString anImageFile)=0
 
virtual void DrawImage (const Handle< Standard_Transient > &anImageId, const Standard_ShortReal aX, const Standard_ShortReal aY)=0
 
virtual void DrawImageFile (const Standard_CString anImageFile, const Standard_ShortReal aX, const Standard_ShortReal aY, const Quantity_Factor aScale=1.0)=0
 
virtual void FillAndDrawImage (const Handle< Standard_Transient > &anImageId, const Standard_ShortReal aX, const Standard_ShortReal aY, const Standard_Integer aWidth, const Standard_Integer aHeight, const Standard_Address anArrayOfPixels)=0
 Fills a complete Image .
More...
 
virtual void FillAndDrawImage (const Handle< Standard_Transient > &anImageId, const Standard_ShortReal aX, const Standard_ShortReal aY, const Standard_Integer anIndexOfLine, const Standard_Integer aWidth, const Standard_Integer aHeight, const Standard_Address anArrayOfPixels)=0
 
Fills a line of the Image . <br>

Warning: 0 <= anIndexOfLine < aHeight
anIndexOfLine = 0 must be the first call
More...

 
virtual void DrawPolyline (const TShort_Array1OfShortReal &aListX, const TShort_Array1OfShortReal &aListY)=0
 Draw a polyline depending of the SetLineAttrib() attributes.
More...
 
virtual void DrawPolygon (const TShort_Array1OfShortReal &aListX, const TShort_Array1OfShortReal &aListY)=0
 Draw a polygon depending of the SetPolyAttrib() attributes.
More...
 
virtual void DrawSegment (const Standard_ShortReal X1, const Standard_ShortReal Y1, const Standard_ShortReal X2, const Standard_ShortReal Y2)=0
 Draw a segment depending of the SetLineAttrib() attributes.
More...
 
virtual void DrawText (const TCollection_ExtendedString &aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Standard_ShortReal anAngle=0.0, const Aspect_TypeOfText aType=Aspect_TOT_SOLID)=0
 Draws a text depending of the SetTextAttrib() attributes.
More...
 
virtual void DrawPolyText (const TCollection_ExtendedString &aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Quantity_Ratio aMarge=0.1, const Standard_ShortReal anAngle=0.0, const Aspect_TypeOfText aType=Aspect_TOT_SOLID)=0
 
 Draws an framed text depending of the <br>

SetTextAttrib() and SetPolyAttrib() attributes.
Warning: Coordinates must be defined in DWU space.
<aMarge> defines the ratio of the space between the
polygon borders and the bounding box of the text and
depending of the height of the text.
More...

 
virtual void DrawPoint (const Standard_ShortReal X, const Standard_ShortReal Y)=0
 Draws a 1 PIXEL point depending of the SetMarkerAttrib()
More...
 
virtual void DrawMarker (const Standard_Integer aMarker, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Standard_ShortReal Width, const Standard_ShortReal Height, const Standard_ShortReal Angle=0.0)=0
 Draws the prevously defined marker <aMarker>
More...
 
virtual Standard_Boolean DrawArc (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal anXradius, const Standard_ShortReal anYradius, const Standard_ShortReal aStartAngle=0.0, const Standard_ShortReal anOpenAngle=6.283185)=0
 Draws an Ellipsoid arc of center <X,Y> and Radius
More...
 
virtual Standard_Boolean DrawPolyArc (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal anXradius, const Standard_ShortReal anYradius, const Standard_ShortReal aStartAngle=0.0, const Standard_ShortReal anOpenAngle=6.283185)=0
 Draws an filled Ellipsoid arc of center <X,Y> and Radius
More...
 
virtual void BeginPolyline (const Standard_Integer aNumber)=0
 
Begin an incremental polyline primitive of <aNumber> of points . <br>

Warning: Points must be added by the the DrawPoint() method.
More...

 
virtual void BeginPolygon (const Standard_Integer aNumber)=0
 
Begin an incremental polygon primitive of <aNumber> of points . <br>

Warning: Points must be added by the the DrawPoint() method.
More...

 
virtual void BeginSegments ()=0
 
Begin a set of segments . <br>

Warning: Segments must be added by the DrawSegment() method.
More...

 
virtual void BeginArcs ()=0
 
Begin a set of circles or ellips . <br>

Warning: Arcs must be added by the DrawArc() methods.
More...

 
virtual void BeginPolyArcs ()=0
 
Begin a set of polygon circles or ellips . <br>

Warning: Arcs must be added by the DrawPolyArc() methods.
More...

 
virtual void BeginMarkers ()=0
 
Begin a set of markers . <br>

Warning: Markers must be added by the DrawMarker() method.
More...

 
virtual void BeginPoints ()=0
 
Begin a set of points . <br>

Warning: Points must be added by the DrawPoint() method.
More...

 
virtual void ClosePrimitive ()=0
 Close the last Begining primitive
More...
 
Handle_Aspect_ColorMap ColorMap () const
 
Handle_Aspect_TypeMap TypeMap () const
 
Handle_Aspect_WidthMap WidthMap () const
 
Handle_Aspect_FontMap FontMap () const
 
Handle_Aspect_MarkMap MarkMap () const
 
virtual void WorkSpace (Quantity_Length &Width, Quantity_Length &Heigth) const =0
 Returns the Available WorkSpace in DWU coordinates
More...
 
virtual Quantity_Length Convert (const Standard_Integer PV) const =0
 Returns the DWU value depending of
the PIXEL value.
More...
 
virtual Standard_Integer Convert (const Quantity_Length DV) const =0
 Returns the PIXEL value depending of
the DWU value.
More...
 
virtual void Convert (const Standard_Integer PX, const Standard_Integer PY, Quantity_Length &DX, Quantity_Length &DY) const =0
 Returns the DWU position depending of
the PIXEL position .
More...
 
virtual void Convert (const Quantity_Length DX, const Quantity_Length DY, Standard_Integer &PX, Standard_Integer &PY) const =0
 Returns the PIXEL position depending of
the DWU position .
//! Returns TRUE when the driver must use MDTV fonts
instead system fonts.
More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Protected Member Functions

 Aspect_Driver ()
 
virtual void InitializeColorMap (const Handle< Aspect_ColorMap > &aColorMap)=0
 
virtual void InitializeTypeMap (const Handle< Aspect_TypeMap > &aTypeMap)=0
 
virtual void InitializeWidthMap (const Handle< Aspect_WidthMap > &aWidthMap)=0
 
virtual void InitializeFontMap (const Handle< Aspect_FontMap > &aFontMap)=0
 
virtual void InitializeMarkMap (const Handle< Aspect_MarkMap > &aMarkMap)=0
 

Detailed Description

Defines the common behaviour of the output driver.
Warning: Permits to defines polyline,polygon,marker and text attributes in relation
with the SINGLE primitives DrawPolyline(),DrawPolygon(),....
or the INCREMENTAL primitives BeginPolyline(),BeginPolygon(),...
or the SET of primitives BeginArcs(),BeginMarkers(),...

NOTE that :
The incremental primitives are interesting to used because
no more arrays are necessary to fill it.
The set of primitives are interesting to used because this
increase the drawing performances.

Constructor & Destructor Documentation

Aspect_Driver::Aspect_Driver ( )
protected

Member Function Documentation

virtual void Aspect_Driver::BeginArcs ( )
pure virtual

Begin a set of circles or ellips . <br>

Warning: Arcs must be added by the DrawArc() methods.

virtual void Aspect_Driver::BeginMarkers ( )
pure virtual

Begin a set of markers . <br>

Warning: Markers must be added by the DrawMarker() method.

virtual void Aspect_Driver::BeginPoints ( )
pure virtual

Begin a set of points . <br>

Warning: Points must be added by the DrawPoint() method.

virtual void Aspect_Driver::BeginPolyArcs ( )
pure virtual

Begin a set of polygon circles or ellips . <br>

Warning: Arcs must be added by the DrawPolyArc() methods.

virtual void Aspect_Driver::BeginPolygon ( const Standard_Integer  aNumber)
pure virtual

Begin an incremental polygon primitive of <aNumber> of points . <br>

Warning: Points must be added by the the DrawPoint() method.

virtual void Aspect_Driver::BeginPolyline ( const Standard_Integer  aNumber)
pure virtual

Begin an incremental polyline primitive of <aNumber> of points . <br>

Warning: Points must be added by the the DrawPoint() method.

virtual void Aspect_Driver::BeginSegments ( )
pure virtual

Begin a set of segments . <br>

Warning: Segments must be added by the DrawSegment() method.

virtual void Aspect_Driver::ClearImage ( const Handle< Standard_Transient > &  anImageId)
pure virtual
virtual void Aspect_Driver::ClearImageFile ( const Standard_CString  anImageFile)
pure virtual
virtual void Aspect_Driver::ClosePrimitive ( )
pure virtual

Close the last Begining primitive

Handle_Aspect_ColorMap Aspect_Driver::ColorMap ( ) const
virtual Quantity_Length Aspect_Driver::Convert ( const Standard_Integer  PV) const
pure virtual

Returns the DWU value depending of
the PIXEL value.

virtual Standard_Integer Aspect_Driver::Convert ( const Quantity_Length  DV) const
pure virtual

Returns the PIXEL value depending of
the DWU value.

virtual void Aspect_Driver::Convert ( const Standard_Integer  PX,
const Standard_Integer  PY,
Quantity_Length DX,
Quantity_Length DY 
) const
pure virtual

Returns the DWU position depending of
the PIXEL position .

virtual void Aspect_Driver::Convert ( const Quantity_Length  DX,
const Quantity_Length  DY,
Standard_Integer PX,
Standard_Integer PY 
) const
pure virtual

Returns the PIXEL position depending of
the DWU position .
//! Returns TRUE when the driver must use MDTV fonts
instead system fonts.

virtual Standard_Boolean Aspect_Driver::DrawArc ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  anXradius,
const Standard_ShortReal  anYradius,
const Standard_ShortReal  aStartAngle = 0.0,
const Standard_ShortReal  anOpenAngle = 6.283185 
)
pure virtual

Draws an Ellipsoid arc of center <X,Y> and Radius

virtual void Aspect_Driver::DrawImage ( const Handle< Standard_Transient > &  anImageId,
const Standard_ShortReal  aX,
const Standard_ShortReal  aY 
)
pure virtual
virtual void Aspect_Driver::DrawImageFile ( const Standard_CString  anImageFile,
const Standard_ShortReal  aX,
const Standard_ShortReal  aY,
const Quantity_Factor  aScale = 1.0 
)
pure virtual
virtual void Aspect_Driver::DrawMarker ( const Standard_Integer  aMarker,
const Standard_ShortReal  Xpos,
const Standard_ShortReal  Ypos,
const Standard_ShortReal  Width,
const Standard_ShortReal  Height,
const Standard_ShortReal  Angle = 0.0 
)
pure virtual

Draws the prevously defined marker <aMarker>

virtual void Aspect_Driver::DrawPoint ( const Standard_ShortReal  X,
const Standard_ShortReal  Y 
)
pure virtual

Draws a 1 PIXEL point depending of the SetMarkerAttrib()

virtual Standard_Boolean Aspect_Driver::DrawPolyArc ( const Standard_ShortReal  X,
const Standard_ShortReal  Y,
const Standard_ShortReal  anXradius,
const Standard_ShortReal  anYradius,
const Standard_ShortReal  aStartAngle = 0.0,
const Standard_ShortReal  anOpenAngle = 6.283185 
)
pure virtual

Draws an filled Ellipsoid arc of center <X,Y> and Radius

virtual void Aspect_Driver::DrawPolygon ( const TShort_Array1OfShortReal aListX,
const TShort_Array1OfShortReal aListY 
)
pure virtual

Draw a polygon depending of the SetPolyAttrib() attributes.

virtual void Aspect_Driver::DrawPolyline ( const TShort_Array1OfShortReal aListX,
const TShort_Array1OfShortReal aListY 
)
pure virtual

Draw a polyline depending of the SetLineAttrib() attributes.

virtual void Aspect_Driver::DrawPolyText ( const TCollection_ExtendedString aText,
const Standard_ShortReal  Xpos,
const Standard_ShortReal  Ypos,
const Quantity_Ratio  aMarge = 0.1,
const Standard_ShortReal  anAngle = 0.0,
const Aspect_TypeOfText  aType = Aspect_TOT_SOLID 
)
pure virtual

 Draws an framed text depending of the <br>

SetTextAttrib() and SetPolyAttrib() attributes.
Warning: Coordinates must be defined in DWU space.
<aMarge> defines the ratio of the space between the
polygon borders and the bounding box of the text and
depending of the height of the text.

virtual void Aspect_Driver::DrawSegment ( const Standard_ShortReal  X1,
const Standard_ShortReal  Y1,
const Standard_ShortReal  X2,
const Standard_ShortReal  Y2 
)
pure virtual

Draw a segment depending of the SetLineAttrib() attributes.

virtual void Aspect_Driver::DrawText ( const TCollection_ExtendedString aText,
const Standard_ShortReal  Xpos,
const Standard_ShortReal  Ypos,
const Standard_ShortReal  anAngle = 0.0,
const Aspect_TypeOfText  aType = Aspect_TOT_SOLID 
)
pure virtual

Draws a text depending of the SetTextAttrib() attributes.

virtual void Aspect_Driver::EndDraw ( const Standard_Boolean  Synchronize = Standard_False)
pure virtual

Flush all graphics and Wait after up to date

virtual void Aspect_Driver::FillAndDrawImage ( const Handle< Standard_Transient > &  anImageId,
const Standard_ShortReal  aX,
const Standard_ShortReal  aY,
const Standard_Integer  aWidth,
const Standard_Integer  aHeight,
const Standard_Address  anArrayOfPixels 
)
pure virtual

Fills a complete Image .

virtual void Aspect_Driver::FillAndDrawImage ( const Handle< Standard_Transient > &  anImageId,
const Standard_ShortReal  aX,
const Standard_ShortReal  aY,
const Standard_Integer  anIndexOfLine,
const Standard_Integer  aWidth,
const Standard_Integer  aHeight,
const Standard_Address  anArrayOfPixels 
)
pure virtual

Fills a line of the Image . <br>

Warning: 0 <= anIndexOfLine < aHeight
anIndexOfLine = 0 must be the first call

Handle_Aspect_FontMap Aspect_Driver::FontMap ( ) const
virtual void Aspect_Driver::InitializeColorMap ( const Handle< Aspect_ColorMap > &  aColorMap)
protectedpure virtual
virtual void Aspect_Driver::InitializeFontMap ( const Handle< Aspect_FontMap > &  aFontMap)
protectedpure virtual
virtual void Aspect_Driver::InitializeMarkMap ( const Handle< Aspect_MarkMap > &  aMarkMap)
protectedpure virtual
virtual void Aspect_Driver::InitializeTypeMap ( const Handle< Aspect_TypeMap > &  aTypeMap)
protectedpure virtual
virtual void Aspect_Driver::InitializeWidthMap ( const Handle< Aspect_WidthMap > &  aWidthMap)
protectedpure virtual
virtual Standard_Boolean Aspect_Driver::IsKnownImage ( const Handle< Standard_Transient > &  anImage)
pure virtual
Handle_Aspect_MarkMap Aspect_Driver::MarkMap ( ) const
void Aspect_Driver::SetColorMap ( const Handle< Aspect_ColorMap > &  aColorMap)
void Aspect_Driver::SetFontMap ( const Handle< Aspect_FontMap > &  aFontMap)

Sets the current font map to this driver and Enable/Disable
this driver to use MDTV fonts instead system fonts.

virtual void Aspect_Driver::SetLineAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  TypeIndex,
const Standard_Integer  WidthIndex 
)
pure virtual
virtual void Aspect_Driver::SetMarkerAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  WidthIndex,
const Standard_Boolean  FillMarker = Standard_False 
)
pure virtual
void Aspect_Driver::SetMarkMap ( const Handle< Aspect_MarkMap > &  aMarkMap)
virtual void Aspect_Driver::SetPolyAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  TileIndex,
const Standard_Boolean  DrawEdge = Standard_False 
)
pure virtual
virtual void Aspect_Driver::SetTextAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  FontIndex 
)
pure virtual
virtual void Aspect_Driver::SetTextAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  FontIndex,
const Quantity_PlaneAngle  aSlant,
const Quantity_Factor  aHScale,
const Quantity_Factor  aWScale,
const Standard_Boolean  isUnderlined = Standard_False 
)
pure virtual
void Aspect_Driver::SetTypeMap ( const Handle< Aspect_TypeMap > &  aTypeMap)
void Aspect_Driver::SetWidthMap ( const Handle< Aspect_WidthMap > &  aWidthMap)
virtual Standard_Boolean Aspect_Driver::SizeOfImageFile ( const Standard_CString  anImageFile,
Standard_Integer aWidth,
Standard_Integer aHeight 
) const
pure virtual
Handle_Aspect_TypeMap Aspect_Driver::TypeMap ( ) const
Handle_Aspect_WidthMap Aspect_Driver::WidthMap ( ) const
virtual void Aspect_Driver::WorkSpace ( Quantity_Length Width,
Quantity_Length Heigth 
) const
pure virtual

Returns the Available WorkSpace in DWU coordinates


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