Open CASCADE Technology 7.8.2.dev
Draw_View Class Reference

#include <Draw_View.hxx>

Inheritance diagram for Draw_View:

Public Member Functions

 Draw_View (Standard_Integer theId, Draw_Viewer *theViewer, Standard_Integer theX, Standard_Integer theY, Standard_Integer theWidth, Standard_Integer theHeight, Aspect_Drawable theWindow=0)
 Constructor.
 
 Draw_View (Standard_Integer theId, Draw_Viewer *theViewer, const char *theTitle)
 Constructor.
 
 ~Draw_View ()
 Destructor.
 
Standard_Integer GetDx () const
 Gets horizontal offset.
 
void SetDx (const Standard_Integer theDx)
 Sets horizontal offset.
 
Standard_Integer GetDy () const
 Gets vertical offset.
 
void SetDy (const Standard_Integer theDy)
 Sets vertical offset.
 
Standard_Real GetZoom () const
 Gets parameter of zoom.
 
void SetZoom (const Standard_Real theZoom)
 Sets parameter of zoom.
 
const gp_TrsfGetMatrix () const
 Gets matrix of view.
 
void SetMatrix (const gp_Trsf &theMatrix)
 Sets view matrix.
 
Standard_Real GetFocalDistance () const
 Gets focal distance.
 
void SetFocalDistance (const Standard_Real theDistance)
 Sets focal distance.
 
const char * Type ()
 Returns type of view.
 
Standard_Boolean Is2D () const
 Returns true value if current view in 2D mode.
 
Standard_Real IsPerspective () const
 Returns true value if current view in perspective mode.
 
- Public Member Functions inherited from Draw_Window
virtual ~Draw_Window ()
 Destructor.
 
void GetPosition (Standard_Integer &thePosX, Standard_Integer &thePosY)
 Get window position.
 
void SetPosition (Standard_Integer theNewXpos, Standard_Integer theNewYpos)
 Set window position.
 
Standard_Integer HeightWin () const
 Return window height.
 
Standard_Integer WidthWin () const
 Return window width.
 
void SetDimension (Standard_Integer theNewDx, Standard_Integer theNewDy)
 Set window dimensions.
 
TCollection_AsciiString GetTitle () const
 Return window title.
 
void SetTitle (const TCollection_AsciiString &theTitle)
 Set window title.
 
bool IsMapped () const
 Return true if window is displayed on the screen.
 
void DisplayWindow ()
 Display window on the screen.
 
void Hide ()
 Hide window.
 
void Destroy ()
 Destroy window.
 
void Clear ()
 Clear window content.
 
Standard_Boolean GetUseBuffer () const
 Returns Standard_True if off-screen image buffer is being used.
 
void SetUseBuffer (Standard_Boolean theToUse)
 
void SetColor (Standard_Integer theColor)
 Set active color index for further paintings.
 
void SetMode (Standard_Integer theMode)
 Set active paint mode (3 for COPY; 6 for XOR).
 
void DrawString (Standard_Integer theX, Standard_Integer theY, const char *theText)
 Draw the string.
 
void DrawSegments (const Draw_XSegment *theSegments, Standard_Integer theNumberOfElements)
 Draw array of segments.
 
void Redraw ()
 Redraw window content.
 
Standard_Boolean Save (const char *theFileName) const
 Save snapshot.
 
void InitBuffer ()
 (Re)initializes off-screen image buffer according to current window size.
 

view API

Standard_Integer myId
 Initialize view by the type.
 
Draw_ViewermyViewer
 Initialize view by the type.
 
char myType [5]
 Initialize view by the type.
 
Standard_Boolean myIsPers
 Initialize view by the type.
 
Standard_Boolean myIs2D
 Initialize view by the type.
 
Standard_Real myFocalDistance
 Initialize view by the type.
 
Standard_Real myZoom
 Initialize view by the type.
 
gp_Trsf myMatrix
 Initialize view by the type.
 
Standard_Integer myDx
 Initialize view by the type.
 
Standard_Integer myDy
 Initialize view by the type.
 
Standard_Integer myFrameX0
 Initialize view by the type.
 
Standard_Integer myFrameY0
 Initialize view by the type.
 
Standard_Integer myFrameX1
 Initialize view by the type.
 
Standard_Integer myFrameY1
 Initialize view by the type.
 
Standard_Boolean Init (const char *theType)
 Initialize view by the type.
 
void Transform (const gp_Trsf &theTransformation)
 Transform view matrix.
 
void ResetFrame ()
 Resets frame of current view.
 
void GetFrame (Standard_Integer &theX0, Standard_Integer &theY0, Standard_Integer &theX1, Standard_Integer &theY1)
 Returns parameters of frame corners.
 
virtual void WExpose () override
 Perform window exposing.
 

Additional Inherited Members

- Public Types inherited from Draw_Window
typedef void(*) FCallbackBeforeTerminate()
 Type of the callback function that is to be passed to the method AddCallbackBeforeTerminate().
 
- Static Public Member Functions inherited from Draw_Window
static void AddCallbackBeforeTerminate (FCallbackBeforeTerminate theCB)
 This method registers a callback function that will be called just before exit. This is useful especially for Windows platform, on which Draw is normally self-terminated instead of exiting.
 
static void RemoveCallbackBeforeTerminate (FCallbackBeforeTerminate theCB)
 Just in case method for un-registering a callback previously registered by AddCallbackBeforeTerminate().
 
static Standard_Boolean DefineColor (const Standard_Integer theIndex, const char *theColorName)
 
static void Flush ()
 XFlush() wrapper (X11), has no effect on other platforms.
 
- Protected Member Functions inherited from Draw_Window
 Draw_Window (const char *theTitle, const NCollection_Vec2< int > &theXY, const NCollection_Vec2< int > &theSize, Aspect_Drawable theParent, Aspect_Drawable theWin)
 Main constructor.
 
void init (const NCollection_Vec2< int > &theXY, const NCollection_Vec2< int > &theSize)
 Initialize the window.
 

Constructor & Destructor Documentation

◆ Draw_View() [1/2]

Draw_View::Draw_View ( Standard_Integer theId,
Draw_Viewer * theViewer,
Standard_Integer theX,
Standard_Integer theY,
Standard_Integer theWidth,
Standard_Integer theHeight,
Aspect_Drawable theWindow = 0 )

Constructor.

◆ Draw_View() [2/2]

Draw_View::Draw_View ( Standard_Integer theId,
Draw_Viewer * theViewer,
const char * theTitle )

Constructor.

◆ ~Draw_View()

Draw_View::~Draw_View ( )

Destructor.

Member Function Documentation

◆ GetDx()

Standard_Integer Draw_View::GetDx ( ) const
inline

Gets horizontal offset.

◆ GetDy()

Standard_Integer Draw_View::GetDy ( ) const
inline

Gets vertical offset.

◆ GetFocalDistance()

Standard_Real Draw_View::GetFocalDistance ( ) const
inline

Gets focal distance.

◆ GetFrame()

void Draw_View::GetFrame ( Standard_Integer & theX0,
Standard_Integer & theY0,
Standard_Integer & theX1,
Standard_Integer & theY1 )

Returns parameters of frame corners.

◆ GetMatrix()

const gp_Trsf & Draw_View::GetMatrix ( ) const
inline

Gets matrix of view.

◆ GetZoom()

Standard_Real Draw_View::GetZoom ( ) const
inline

Gets parameter of zoom.

◆ Init()

Standard_Boolean Draw_View::Init ( const char * theType)

Initialize view by the type.

◆ Is2D()

Standard_Boolean Draw_View::Is2D ( ) const
inline

Returns true value if current view in 2D mode.

◆ IsPerspective()

Standard_Real Draw_View::IsPerspective ( ) const
inline

Returns true value if current view in perspective mode.

◆ ResetFrame()

void Draw_View::ResetFrame ( )

Resets frame of current view.

◆ SetDx()

void Draw_View::SetDx ( const Standard_Integer theDx)
inline

Sets horizontal offset.

◆ SetDy()

void Draw_View::SetDy ( const Standard_Integer theDy)
inline

Sets vertical offset.

◆ SetFocalDistance()

void Draw_View::SetFocalDistance ( const Standard_Real theDistance)
inline

Sets focal distance.

◆ SetMatrix()

void Draw_View::SetMatrix ( const gp_Trsf & theMatrix)
inline

Sets view matrix.

◆ SetZoom()

void Draw_View::SetZoom ( const Standard_Real theZoom)
inline

Sets parameter of zoom.

◆ Transform()

void Draw_View::Transform ( const gp_Trsf & theTransformation)

Transform view matrix.

◆ Type()

const char * Draw_View::Type ( )
inline

Returns type of view.

◆ WExpose()

virtual void Draw_View::WExpose ( )
overridevirtual

Perform window exposing.

Implements Draw_Window.

Field Documentation

◆ myDx

Standard_Integer Draw_View::myDx
protected

Initialize view by the type.

◆ myDy

Standard_Integer Draw_View::myDy
protected

Initialize view by the type.

◆ myFocalDistance

Standard_Real Draw_View::myFocalDistance
protected

Initialize view by the type.

◆ myFrameX0

Standard_Integer Draw_View::myFrameX0
protected

Initialize view by the type.

◆ myFrameX1

Standard_Integer Draw_View::myFrameX1
protected

Initialize view by the type.

◆ myFrameY0

Standard_Integer Draw_View::myFrameY0
protected

Initialize view by the type.

◆ myFrameY1

Standard_Integer Draw_View::myFrameY1
protected

Initialize view by the type.

◆ myId

Standard_Integer Draw_View::myId
protected

Initialize view by the type.

◆ myIs2D

Standard_Boolean Draw_View::myIs2D
protected

Initialize view by the type.

◆ myIsPers

Standard_Boolean Draw_View::myIsPers
protected

Initialize view by the type.

◆ myMatrix

gp_Trsf Draw_View::myMatrix
protected

Initialize view by the type.

◆ myType

char Draw_View::myType[5]
protected

Initialize view by the type.

◆ myViewer

Draw_Viewer* Draw_View::myViewer
protected

Initialize view by the type.

◆ myZoom

Standard_Real Draw_View::myZoom
protected

Initialize view by the type.


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