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

Class provides specific information for redrawing view to offscreen buffer on printing. The information is: projection matrixes for tiling, scaling factors for text/markers and layer viewport dimensions. The OpenGl_PrinterContext class allows to have only one global instance that can be accessed by GetPrinterContext() during printing operation. The class instance can be created only by call_togl_print().

#include <OpenGl_PrinterContext.hxx>

Inheritance diagram for OpenGl_PrinterContext:
Inheritance graph
[legend]

Public Member Functions

const TColStd_Array2OfRealGetProjTransformation ()
 Get view projection transformation matrix.
void GetProjTransformation (GLfloat theMatrix[16])
 Get view projection transformation matrix.
void GetScale (GLfloat &theScaleX, GLfloat &theScaleY)
 Get text/markers scale factor.
void GetLayerViewport (GLsizei &theViewportX, GLsizei &theViewportY)
 Get layer viewport dimensions.

Static Public Member Functions

static OpenGl_PrinterContextGetPrinterContext (GLCONTEXT theCtx)
 Get the PrinterContext instance assigned for OpenGl context. Return NULL, if there is no current printing operation and there is no assigned instance for "theCtx" OpenGl context.

Friends

Standard_Boolean OpenGl_Workspace::Print (const Graphic3d_CView &ACView, const Aspect_CLayer2d &ACUnderLayer, const Aspect_CLayer2d &ACOverLayer, const Aspect_Handle hPrintDC, const Standard_Boolean showBackground, const Standard_CString filename, const Aspect_PrintAlgo printAlgorithm, const Standard_Real theScaleFactor)

Member Function Documentation

void OpenGl_PrinterContext::GetLayerViewport ( GLsizei &  theViewportX,
GLsizei &  theViewportY 
) [inline]
void OpenGl_PrinterContext::GetScale ( GLfloat theScaleX,
GLfloat theScaleY 
) [inline]

Friends And Related Function Documentation

Standard_Boolean OpenGl_Workspace::Print ( const Graphic3d_CView ACView,
const Aspect_CLayer2d ACUnderLayer,
const Aspect_CLayer2d ACOverLayer,
const Aspect_Handle  hPrintDC,
const Standard_Boolean  showBackground,
const Standard_CString  filename,
const Aspect_PrintAlgo  printAlgorithm,
const Standard_Real  theScaleFactor 
) [friend]

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