# Visualization
TKService
CGM

# CGM_Driver Class Reference

This class defines a CGM (Computer Graphic Metafile) plotter Driver.
All necessary information about methods (purpose, level, category, etc.)
can be found in CDL files from the inheritance tree (PlotMgt_PlotterDriver,
Aspect_Driver).
.

`#include <CGM_Driver.hxx>`

Inheritance diagram for CGM_Driver:

[legend]

## Public Member Functions

Standard_EXPORT | CGM_Driver (const Handle(PlotMgt_Plotter)&aPlotter, const Standard_CString aName, const Quantity_Length aDX, const Quantity_Length aDY, const Aspect_TypeOfColorSpace aTypeOfColorSpace=Aspect_TOCS_RGB)
Standard_EXPORT | CGM_Driver (const Standard_CString aName, const Quantity_Length aDX, const Quantity_Length aDY, const Aspect_TypeOfColorSpace aTypeOfColorSpace=Aspect_TOCS_RGB)
virtual Standard_EXPORT void | BeginDraw ()
| Begins a new page of graphics in the plotter file name. .
virtual Standard_EXPORT void | EndDraw (const Standard_Boolean dontFlush=Standard_False)
| Flush all graphics and Wait after up to date .
virtual Standard_EXPORT 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, .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Member Functions

virtual Standard_EXPORT void | Close ()
| ~CGM_Driver ()
virtual Standard_EXPORT void | InitializeColorMap (const Handle(Aspect_ColorMap)&aColorMap)
virtual Standard_EXPORT void | InitializeTypeMap (const Handle(Aspect_TypeMap)&aTypeMap)
virtual Standard_EXPORT void | InitializeWidthMap (const Handle(Aspect_WidthMap)&aWidthMap)
virtual Standard_EXPORT void | PlotLineAttrib (const Standard_Integer ColorIndex, const Standard_Integer TypeIndex, const Standard_Integer WidthIndex)
| retrieve current line attributes
virtual Standard_EXPORT void | PlotPolyAttrib (const Standard_Integer ColorIndex, const Standard_Integer TileIndex, const Standard_Boolean DrawEdge)
| retrieve current poly attributes
virtual Standard_EXPORT Standard_Boolean | PlotPoint (const Standard_ShortReal X, const Standard_ShortReal Y)
virtual Standard_EXPORT Standard_Boolean | PlotSegment (const Standard_ShortReal X1, const Standard_ShortReal Y1, const Standard_ShortReal X2, const Standard_ShortReal Y2)
virtual Standard_EXPORT Standard_Boolean | PlotPolyline (const Standard_Address xArray, const Standard_Address yArray, const Standard_Address nPts, const Standard_Integer nParts)
virtual Standard_EXPORT Standard_Boolean | PlotPolygon (const Standard_Address xArray, const Standard_Address yArray, const Standard_Address nPts, const Standard_Integer nParts)
virtual Standard_EXPORT 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_EXPORT 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_EXPORT 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)

## Private Member Functions

Standard_EXPORT void | BeginFile (const Handle(PlotMgt_Plotter)&aPlotter, const Quantity_Length aDX, const Quantity_Length aDY, const Aspect_TypeOfColorSpace aTypeOfColorSpace)
Standard_EXPORT void | InitializeDriver (const Standard_CString aName)
Standard_EXPORT void | WriteData (const Standard_Integer aCode, const Standard_Address pLongData, const Standard_Address pFloatData, const Standard_Address pCharData)

## Private Attributes

Standard_Integer | myBKIndex
Standard_Integer | myCurrentPage
Standard_Boolean | myFileIsOpened
Standard_Integer | myFillIndex
Standard_Integer | myEdgeColor
Standard_Integer | myEdgeType
Standard_Integer | myEdgeWidth
Standard_Integer | myInteriorStyle
Standard_Integer | myEdgeVisibility

## Constructor & Destructor Documentation

Standard_EXPORT CGM_Driver::CGM_Driver | ( | const Handle(PlotMgt_Plotter)& | aPlotter,
|  | const Standard_CString | aName,
|  | const Quantity_Length | aDX,
|  | const Quantity_Length | aDY,
|  | const Aspect_TypeOfColorSpace | aTypeOfColorSpace = `Aspect_TOCS_RGB`
| ) |

Standard_EXPORT CGM_Driver::CGM_Driver | ( | const Standard_CString | aName,
|  | const Quantity_Length | aDX,
|  | const Quantity_Length | aDY,
|  | const Aspect_TypeOfColorSpace | aTypeOfColorSpace = `Aspect_TOCS_RGB`
| ) |

CGM_Driver::~CGM_Driver | ( |  | ) | `[inline, protected]`

## Member Function Documentation

virtual Standard_EXPORT void CGM_Driver::BeginDraw | ( |  | ) | `[virtual]`

| Implements PlotMgt_PlotterDriver.

Standard_EXPORT void CGM_Driver::BeginFile | ( | const Handle(PlotMgt_Plotter)& | aPlotter,
|  | const Quantity_Length | aDX,
|  | const Quantity_Length | aDY,
|  | const Aspect_TypeOfColorSpace | aTypeOfColorSpace
| ) | `[private]`

virtual Standard_EXPORT void CGM_Driver::Close | ( |  | ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT void CGM_Driver::EndDraw | ( | const Standard_Boolean | dontFlush = `Standard_False` | ) | `[virtual]`

| Implements Aspect_Driver.

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

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT void CGM_Driver::InitializeColorMap | ( | const Handle(Aspect_ColorMap)& | aColorMap | ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

Standard_EXPORT void CGM_Driver::InitializeDriver | ( | const Standard_CString | aName | ) | `[private]`

virtual Standard_EXPORT void CGM_Driver::InitializeTypeMap | ( | const Handle(Aspect_TypeMap)& | aTypeMap | ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT void CGM_Driver::InitializeWidthMap | ( | const Handle(Aspect_WidthMap)& | aWidthMap | ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::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
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::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`
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT void CGM_Driver::PlotLineAttrib | ( | const Standard_Integer | ColorIndex,
|  | const Standard_Integer | TypeIndex,
|  | const Standard_Integer | WidthIndex
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::PlotPoint | ( | const Standard_ShortReal | X,
|  | const Standard_ShortReal | Y
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::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
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT void CGM_Driver::PlotPolyAttrib | ( | const Standard_Integer | ColorIndex,
|  | const Standard_Integer | TileIndex,
|  | const Standard_Boolean | DrawEdge
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::PlotPolygon | ( | const Standard_Address | xArray,
|  | const Standard_Address | yArray,
|  | const Standard_Address | nPts,
|  | const Standard_Integer | nParts
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::PlotPolyline | ( | const Standard_Address | xArray,
|  | const Standard_Address | yArray,
|  | const Standard_Address | nPts,
|  | const Standard_Integer | nParts
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::PlotSegment | ( | const Standard_ShortReal | X1,
|  | const Standard_ShortReal | Y1,
|  | const Standard_ShortReal | X2,
|  | const Standard_ShortReal | Y2
| ) | `[protected, virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

virtual Standard_EXPORT Standard_Boolean CGM_Driver::SizeOfImageFile | ( | const Standard_CString | anImageFile,
|  | Standard_Integer & | aWidth,
|  | Standard_Integer & | aHeight
| ) | const`[virtual]`

| Reimplemented from PlotMgt_PlotterDriver.

Standard_EXPORT void CGM_Driver::WriteData | ( | const Standard_Integer | aCode,
|  | const Standard_Address | pLongData,
|  | const Standard_Address | pFloatData,
|  | const Standard_Address | pCharData
| ) | `[private]`

## Field Documentation

Standard_Integer CGM_Driver::myBKIndex `[private]`

Standard_Integer CGM_Driver::myCurrentPage `[private]`

Standard_Integer CGM_Driver::myEdgeColor `[private]`

Standard_Integer CGM_Driver::myEdgeType `[private]`

Standard_Integer CGM_Driver::myEdgeVisibility `[private]`

Standard_Integer CGM_Driver::myEdgeWidth `[private]`

Standard_Boolean CGM_Driver::myFileIsOpened `[private]`

Standard_Integer CGM_Driver::myFillIndex `[private]`

Standard_Integer CGM_Driver::myInteriorStyle `[private]`

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

- CGM_Driver.hxx