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

#include <PlotMgt_PlotterDriver.hxx>

Inheritance diagram for PlotMgt_PlotterDriver:
Inheritance graph
[legend]

Public Member Functions

virtual void BeginDraw ()=0
 Begins a new page of graphics in the plotter file name.

virtual void Close ()
 ~PlotMgt_PlotterDriver ()
virtual Standard_Boolean Spool (const Aspect_PlotMode aPlotMode=Aspect_PM_FILEONLY, const Standard_CString aReserved1=NULL, const Standard_Boolean aReserved2=Standard_False)
virtual void SetLineAttrib (const Standard_Integer ColorIndex, const Standard_Integer TypeIndex, const Standard_Integer WidthIndex)
virtual void SetTextAttrib (const Standard_Integer ColorIndex, const Standard_Integer FontIndex)
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)
virtual void SetPolyAttrib (const Standard_Integer ColorIndex, const Standard_Integer TileIndex, const Standard_Boolean DrawEdge=Standard_False)
virtual void SetMarkerAttrib (const Standard_Integer ColorIndex, const Standard_Integer WidthIndex, const Standard_Boolean FillMarker=Standard_False)
void SetPixelSize (const Standard_Real aSize)
virtual void BeginPolyline (const Standard_Integer aNumber)
 Begin an incremental polyline primitive of <aNumber> of points .
Warning: Points must be added by the the DrawPoint() method.

virtual void BeginPolygon (const Standard_Integer aNumber)
 Begin an incremental polygon primitive of <aNumber> of points .
Warning: Points must be added by the the DrawPoint() method.

virtual void BeginSegments ()
 Begin a set of segments.
Warning: Segments must be added by the DrawSegment() method.

virtual void BeginArcs ()
 Begin a set of circles or ellipses.
Warning: Arcs must be added by the DrawArc() methods.

virtual void BeginPolyArcs ()
 Begin a set of polygon circles or ellipses.
Warning: Arcs must be added by the DrawPolyArc() methods.

virtual void BeginMarkers ()
 Begin a set of markers.
Warning: Markers must be added by the DrawMarker() method.

virtual void BeginPoints ()
 Begin a set of points.
Warning: Points must be added by the DrawPoint() method.

virtual void ClosePrimitive ()
 Close the last Begining primitive

virtual Standard_Boolean IsKnownImage (const Handle< Standard_Transient > &anImage)
virtual Standard_Boolean SizeOfImageFile (const Standard_CString anImageFile, Standard_Integer &aWidth, Standard_Integer &aHeight) const
 Returns Standard_True and the Image Size in PIXEL
if the image file exist and can be computed by the driver,

virtual void ClearImage (const Handle< Standard_Transient > &anImageId)
virtual void ClearImageFile (const Standard_CString anImageFile)
 Clears the image associated with the image file .

virtual void DrawImage (const Handle< Standard_Transient > &anImageId, const Standard_ShortReal aX, const Standard_ShortReal aY)
 Draws the image in <me>.
<aX>, <aY> is the center of the image.
Image center must be defined in DPU space.

virtual void DrawImageFile (const Standard_CString anImageFile, const Standard_ShortReal aX, const Standard_ShortReal aY, const Quantity_Factor aScale=1.0)
 Draws the image file in <me>.
<aX>, <aY> is the center of the image.
Image center must be defined in DPU space.

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)
 Draw a complete image .
Image size must be defined in DPU space>

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)
 Fills a line of the Image .

void DrawPoint (const Standard_ShortReal X, const Standard_ShortReal Y)
 Draws a 1 PIXEL point depending of the SetMarkerAttrib()

void DrawSegment (const Standard_ShortReal X1, const Standard_ShortReal Y1, const Standard_ShortReal X2, const Standard_ShortReal Y2)
 Draw a segment depending of the SetLineAttrib() attributes.

void DrawRectangle (const Standard_ShortReal aX, const Standard_ShortReal aY, const Standard_ShortReal aDX, const Standard_ShortReal aDY)
 Draw a rectangle. aX,aY is start point
aDX , aDY are horizontal and vertical dimensions

void DrawPolyline (const TShort_Array1OfShortReal &aListX, const TShort_Array1OfShortReal &aListY)
 Draw a polyline depending of the SetLineAttrib() attributes.

void DrawPolygon (const TShort_Array1OfShortReal &aListX, const TShort_Array1OfShortReal &aListY)
 Draw a polygon depending of the SetPolyAttrib() attributes.

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)
 Draws an Ellipsoid arc of center <X,Y> and Radius

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)
 Draws an filled Ellipsoid arc of center <X,Y> and Radius

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)
 Draws the marker <aMarker>

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)
 Draws a text depending of the SetTextAttrib() attributes.
Warning: Coordinates must be defined in DWU space.

void DrawText (const Standard_CString aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Standard_ShortReal anAngle=0.0, const Aspect_TypeOfText aType=Aspect_TOT_SOLID)
 Draws a text depending of the SetTextAttrib() attributes.
Warning: Coordinates must be defined in DWU space.

void DrawPolyText (const TCollection_ExtendedString &aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Quantity_Ratio aMargin=0.1, const Standard_ShortReal anAngle=0.0, const Aspect_TypeOfText aType=Aspect_TOT_SOLID)
 Draws an framed text depending of the
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.

void DrawPolyText (const Standard_CString aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Quantity_Ratio aMargin=0.1, const Standard_ShortReal anAngle=0.0, const Aspect_TypeOfText aType=Aspect_TOT_SOLID)
 Draws an framed text depending of the
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.

Handle_PlotMgt_Plotter Plotter () const
TCollection_AsciiString PlotFileName () const
TCollection_AsciiString DrawingName () const
TCollection_AsciiString SpoolDirectory () const
virtual void WorkSpace (Quantity_Length &Width, Quantity_Length &Height) const
 Returns the Available WorkSpace in DWU coordinates

virtual Quantity_Length Convert (const Standard_Integer PV) const
 Returns the DWU value depending of the PIXEL value.

virtual Standard_Integer Convert (const Quantity_Length DV) const
 Returns the PIXEL value depending of the DWU value.

virtual void Convert (const Standard_Integer PX, const Standard_Integer PY, Quantity_Length &DX, Quantity_Length &DY) const
 Returns the DWU position depending of the PIXEL position.

virtual void Convert (const Quantity_Length DX, const Quantity_Length DY, Standard_Integer &PX, Standard_Integer &PY) const
 Returns the PIXEL position depending of the DWU position .

void LineAttrib (Standard_Integer &ColorIndex, Standard_Integer &TypeIndex, Standard_Integer &WidthIndex) const
void PolyAttrib (Standard_Integer &ColorIndex, Standard_Integer &TileIndex, Standard_Boolean &EdgeFlag) const

Protected Member Functions

 PlotMgt_PlotterDriver (const Handle< PlotMgt_Plotter > &aPlotter, const Standard_CString aFileName, const Standard_Boolean fCreateFile=Standard_False)
 PlotMgt_PlotterDriver (const Standard_CString aFileName, const Standard_Boolean fCreateFile=Standard_False)
virtual void CreateDriverColorMap ()
virtual void CreateDriverTypeMap ()
virtual void CreateDriverWidthMap ()
virtual void CreateDriverMarkMap ()
virtual void InitializeColorMap (const Handle< Aspect_ColorMap > &aColorMap)
virtual void InitializeTypeMap (const Handle< Aspect_TypeMap > &aTypeMap)
virtual void InitializeWidthMap (const Handle< Aspect_WidthMap > &aWidthMap)
virtual void InitializeFontMap (const Handle< Aspect_FontMap > &aFontMap)
virtual void InitializeMarkMap (const Handle< Aspect_MarkMap > &aFontMap)
void SetPlotter (const Handle< PlotMgt_Plotter > &aPlotter)
 Set the plotter to be used by Spool() method.
Fail if Plotter is already defined

virtual void PlotLineAttrib (const Standard_Integer ColorIndex, const Standard_Integer TypeIndex, const Standard_Integer WidthIndex)
 retrieve current line attributes

virtual void PlotPolyAttrib (const Standard_Integer ColorIndex, const Standard_Integer TileIndex, const Standard_Boolean DrawEdge)
 retrieve current poly attributes

virtual Standard_Boolean PlotPoint (const Standard_ShortReal X, const Standard_ShortReal Y)
virtual Standard_Boolean PlotSegment (const Standard_ShortReal X1, const Standard_ShortReal Y1, const Standard_ShortReal X2, const Standard_ShortReal Y2)
virtual Standard_Boolean PlotRectangle (const Standard_ShortReal aX, const Standard_ShortReal aY, const Standard_ShortReal aDX, const Standard_ShortReal aDY, const Standard_ShortReal aAngle=0.0)
virtual Standard_Boolean PlotPolyline (const Standard_Address xArray, const Standard_Address yArray, const Standard_Address nPts, const Standard_Integer nParts)
virtual Standard_Boolean PlotPolygon (const Standard_Address xArray, const Standard_Address yArray, const Standard_Address nPts, const Standard_Integer nParts)
virtual Standard_Boolean PlotArc (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal anXradius, const Standard_ShortReal anYradius, const Standard_ShortReal sAngle, const Standard_ShortReal oAngle)
virtual Standard_Boolean PlotPolyArc (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal anXradius, const Standard_ShortReal anYradius, const Standard_ShortReal sAngle, const Standard_ShortReal oAngle)
virtual Standard_Boolean PlotMarker (const Standard_Integer aMarker, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Standard_ShortReal Width, const Standard_ShortReal Height, const Standard_ShortReal Angle)
virtual Standard_Boolean PlotText (const TCollection_ExtendedString &aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Standard_ShortReal anAngle, const Aspect_TypeOfText aType)
virtual Standard_Boolean PlotText (const Standard_CString aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Standard_ShortReal anAngle, const Aspect_TypeOfText aType)
virtual Standard_Boolean PlotPolyText (const TCollection_ExtendedString &aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Quantity_Ratio aMargin, const Standard_ShortReal anAngle, const Aspect_TypeOfText aType)
virtual Standard_Boolean PlotPolyText (const Standard_CString aText, const Standard_ShortReal Xpos, const Standard_ShortReal Ypos, const Quantity_Ratio aMargin, const Standard_ShortReal anAngle, const Aspect_TypeOfText aType)
virtual Standard_Boolean PlotImage (const Standard_ShortReal aX, const Standard_ShortReal aY, const Standard_ShortReal aWidth, const Standard_ShortReal aHeight, const Standard_ShortReal aScale, const Standard_CString anImageFile, const Standard_Address anArrayOfPixels, const Standard_Integer aLineIndex=-1)
Aspect_FStream Cout () const
virtual Standard_Boolean DrawCurveCapable () const
 Should be called from PlotMgt_TextManager::Curveto()
method to check if the driver is capable to draw curves.

Protected Attributes

Standard_Real myPixelSize
TCollection_AsciiString myDrawingName
TCollection_AsciiString myFileName
Standard_ShortReal myWidth
Standard_ShortReal myHeight
Standard_ShortReal myPaperMargin
Aspect_TypeOfColorSpace myTypeOfColorSpace
Standard_Integer myColorIndex
Standard_Integer myTypeIndex
Standard_Integer myWidthIndex
Standard_Integer myFontIndex
Standard_Integer myLineColorIndex
Standard_Integer myLineTypeIndex
Standard_Integer myLineWidthIndex
Standard_Integer myPolyColorIndex
Standard_Integer myPolyTileIndex
Standard_Boolean myPolyEdgeFlag
Standard_Integer myMarkerColorIndex
Standard_Integer myMarkerWidthIndex
Standard_Boolean myMarkerFillFlag
Standard_Integer myTextColorIndex
Standard_Integer myTextFontIndex
Standard_Real myTextHScale
Standard_Real myTextWScale
Standard_Real myTextSlant
Standard_Real myTextMinHeight
Standard_Boolean myTextIsUnderlined
Standard_Boolean myCapsHeight
Aspect_TypeOfPrimitive myPrimitiveType
Standard_Integer myPrimitiveLength
TShort_Array1OfShortReal myPrimitiveX
TShort_Array1OfShortReal myPrimitiveY
Handle_PlotMgt_HListOfMFTFonts myMFTFonts
Handle_TShort_HArray1OfShortReal myMFTSizes
Handle_PlotMgt_TextManager myTextManager
Handle_Aspect_ColorMap myDriverColorMap
Handle_Aspect_TypeMap myDriverTypeMap
Handle_Aspect_WidthMap myDriverWidthMap
Handle_Aspect_MarkMap myDriverMarkMap

Constructor & Destructor Documentation


Member Function Documentation

virtual void PlotMgt_PlotterDriver::BeginArcs ( ) [virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::BeginDraw ( ) [pure virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::ClearImage ( const Handle< Standard_Transient > &  anImageId) [virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::Close ( ) [virtual]

Reimplemented in WNT_DDriver, and CGM_Driver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::CreateDriverColorMap ( ) [protected, virtual]
virtual void PlotMgt_PlotterDriver::CreateDriverMarkMap ( ) [protected, virtual]
virtual void PlotMgt_PlotterDriver::CreateDriverTypeMap ( ) [protected, virtual]
virtual void PlotMgt_PlotterDriver::CreateDriverWidthMap ( ) [protected, virtual]

Implements Aspect_Driver.

virtual Standard_Boolean PlotMgt_PlotterDriver::DrawCurveCapable ( ) const [protected, virtual]

Reimplemented in PS_Driver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::InitializeColorMap ( const Handle< Aspect_ColorMap > &  aColorMap) [protected, virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

virtual void PlotMgt_PlotterDriver::InitializeFontMap ( const Handle< Aspect_FontMap > &  aFontMap) [protected, virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

virtual void PlotMgt_PlotterDriver::InitializeMarkMap ( const Handle< Aspect_MarkMap > &  aFontMap) [protected, virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

virtual void PlotMgt_PlotterDriver::InitializeTypeMap ( const Handle< Aspect_TypeMap > &  aTypeMap) [protected, virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

virtual void PlotMgt_PlotterDriver::InitializeWidthMap ( const Handle< Aspect_WidthMap > &  aWidthMap) [protected, virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

void PlotMgt_PlotterDriver::LineAttrib ( Standard_Integer ColorIndex,
Standard_Integer TypeIndex,
Standard_Integer WidthIndex 
) const

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Reimplemented in PS_Driver, and CGM_Driver.

virtual void PlotMgt_PlotterDriver::PlotLineAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  TypeIndex,
const Standard_Integer  WidthIndex 
) [protected, virtual]

Reimplemented in PS_Driver, and CGM_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

virtual void PlotMgt_PlotterDriver::PlotPolyAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  TileIndex,
const Standard_Boolean  DrawEdge 
) [protected, virtual]

Reimplemented in CGM_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Handle_PlotMgt_Plotter PlotMgt_PlotterDriver::Plotter ( ) const

Reimplemented in WNT_DDriver, and PS_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

void PlotMgt_PlotterDriver::PolyAttrib ( Standard_Integer ColorIndex,
Standard_Integer TileIndex,
Standard_Boolean EdgeFlag 
) const
virtual void PlotMgt_PlotterDriver::SetLineAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  TypeIndex,
const Standard_Integer  WidthIndex 
) [virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::SetTextAttrib ( const Standard_Integer  ColorIndex,
const Standard_Integer  FontIndex 
) [virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, and PS_Driver.

virtual Standard_Boolean PlotMgt_PlotterDriver::SizeOfImageFile ( const Standard_CString  anImageFile,
Standard_Integer aWidth,
Standard_Integer aHeight 
) const [virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver, PS_Driver, and CGM_Driver.

Reimplemented in WNT_DDriver.

virtual void PlotMgt_PlotterDriver::WorkSpace ( Quantity_Length Width,
Quantity_Length Height 
) const [virtual]

Implements Aspect_Driver.

Reimplemented in WNT_DDriver.


Field Documentation

Handle_Aspect_ColorMap PlotMgt_PlotterDriver::myDriverColorMap [protected]
Handle_Aspect_MarkMap PlotMgt_PlotterDriver::myDriverMarkMap [protected]
Handle_Aspect_TypeMap PlotMgt_PlotterDriver::myDriverTypeMap [protected]
Handle_Aspect_WidthMap PlotMgt_PlotterDriver::myDriverWidthMap [protected]
Handle_PlotMgt_HListOfMFTFonts PlotMgt_PlotterDriver::myMFTFonts [protected]
Handle_TShort_HArray1OfShortReal PlotMgt_PlotterDriver::myMFTSizes [protected]
Handle_PlotMgt_TextManager PlotMgt_PlotterDriver::myTextManager [protected]

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