Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
Draw_View Class Reference

#include <Draw_View.hxx>

Inheritance diagram for Draw_View:
Inheritance graph
[legend]

Public Member Functions

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

view API

Initialize view by the type.

int myId
 Transform view matrix.
 
Draw_ViewermyViewer
 Transform view matrix.
 
char myType [5]
 Transform view matrix.
 
bool myIsPers
 Transform view matrix.
 
bool myIs2D
 Transform view matrix.
 
double myFocalDistance
 Transform view matrix.
 
double myZoom
 Transform view matrix.
 
gp_Trsf myMatrix
 Transform view matrix.
 
int myDx
 Transform view matrix.
 
int myDy
 Transform view matrix.
 
int myFrameX0
 Transform view matrix.
 
int myFrameY0
 Transform view matrix.
 
int myFrameX1
 Transform view matrix.
 
int myFrameY1
 Transform view matrix.
 
bool Init (const char *theType)
 Transform view matrix.
 
void Transform (const gp_Trsf &theTransformation)
 Transform view matrix.
 
void ResetFrame ()
 Resets frame of current view.
 
void GetFrame (int &theX0, int &theY0, int &theX1, int &theY1)
 Returns parameters of frame corners.
 
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 bool DefineColor (const int 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 ( int theId,
Draw_Viewer * theViewer,
int theX,
int theY,
int theWidth,
int theHeight,
Aspect_Drawable theWindow = 0 )

Constructor.

◆ Draw_View() [2/2]

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

Constructor.

◆ ~Draw_View()

Draw_View::~Draw_View ( )
override

Destructor.

Member Function Documentation

◆ GetDx()

int Draw_View::GetDx ( ) const
inline

Gets horizontal offset.

◆ GetDy()

int Draw_View::GetDy ( ) const
inline

Gets vertical offset.

◆ GetFocalDistance()

double Draw_View::GetFocalDistance ( ) const
inline

Gets focal distance.

◆ GetFrame()

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

Returns parameters of frame corners.

◆ GetMatrix()

const gp_Trsf & Draw_View::GetMatrix ( ) const
inline

Gets matrix of view.

◆ GetZoom()

double Draw_View::GetZoom ( ) const
inline

Gets parameter of zoom.

◆ Init()

bool Draw_View::Init ( const char * theType)

Transform view matrix.

◆ Is2D()

bool Draw_View::Is2D ( ) const
inline

Returns true value if current view in 2D mode.

◆ IsPerspective()

double 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 int theDx)
inline

Sets horizontal offset.

◆ SetDy()

void Draw_View::SetDy ( const int theDy)
inline

Sets vertical offset.

◆ SetFocalDistance()

void Draw_View::SetFocalDistance ( const double theDistance)
inline

Sets focal distance.

◆ SetMatrix()

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

Sets view matrix.

◆ SetZoom()

void Draw_View::SetZoom ( const double 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()

void Draw_View::WExpose ( )
overridevirtual

Perform window exposing.

Implements Draw_Window.

Field Documentation

◆ myDx

int Draw_View::myDx
protected

Transform view matrix.

◆ myDy

int Draw_View::myDy
protected

Transform view matrix.

◆ myFocalDistance

double Draw_View::myFocalDistance
protected

Transform view matrix.

◆ myFrameX0

int Draw_View::myFrameX0
protected

Transform view matrix.

◆ myFrameX1

int Draw_View::myFrameX1
protected

Transform view matrix.

◆ myFrameY0

int Draw_View::myFrameY0
protected

Transform view matrix.

◆ myFrameY1

int Draw_View::myFrameY1
protected

Transform view matrix.

◆ myId

int Draw_View::myId
protected

Transform view matrix.

◆ myIs2D

bool Draw_View::myIs2D
protected

Transform view matrix.

◆ myIsPers

bool Draw_View::myIsPers
protected

Transform view matrix.

◆ myMatrix

gp_Trsf Draw_View::myMatrix
protected

Transform view matrix.

◆ myType

char Draw_View::myType[5]
protected

Transform view matrix.

◆ myViewer

Draw_Viewer* Draw_View::myViewer
protected

Transform view matrix.

◆ myZoom

double Draw_View::myZoom
protected

Transform view matrix.


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