Open CASCADE Technology
7.7.0
|
#include <Draw_View.hxx>
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. More... | |
Draw_View (Standard_Integer theId, Draw_Viewer *theViewer, const char *theTitle) | |
Constructor. More... | |
~Draw_View () | |
Destructor. More... | |
Standard_Integer | GetDx () const |
Gets horizontal offset. More... | |
void | SetDx (const Standard_Integer theDx) |
Sets horizontal offset. More... | |
Standard_Integer | GetDy () const |
Gets vertical offset. More... | |
void | SetDy (const Standard_Integer theDy) |
Sets vertical offset. More... | |
Standard_Real | GetZoom () const |
Gets parameter of zoom. More... | |
void | SetZoom (const Standard_Real theZoom) |
Sets parameter of zoom. More... | |
const gp_Trsf & | GetMatrix () const |
Gets matrix of view. More... | |
void | SetMatrix (const gp_Trsf &theMatrix) |
Sets view matrix. More... | |
Standard_Real | GetFocalDistance () const |
Gets focal distance. More... | |
void | SetFocalDistance (const Standard_Real theDistance) |
Sets focal distance. More... | |
const char * | Type () |
Returns type of view. More... | |
Standard_Boolean | Is2D () const |
Returns true value if current view in 2D mode. More... | |
Standard_Real | IsPerspective () const |
Returns true value if current view in perspective mode. More... | |
Public Member Functions inherited from Draw_Window | |
virtual | ~Draw_Window () |
Destructor. More... | |
void | GetPosition (Standard_Integer &thePosX, Standard_Integer &thePosY) |
Get window position. More... | |
void | SetPosition (Standard_Integer theNewXpos, Standard_Integer theNewYpos) |
Set window position. More... | |
Standard_Integer | HeightWin () const |
Return window height. More... | |
Standard_Integer | WidthWin () const |
Return window width. More... | |
void | SetDimension (Standard_Integer theNewDx, Standard_Integer theNewDy) |
Set window dimensions. More... | |
TCollection_AsciiString | GetTitle () const |
Return window title. More... | |
void | SetTitle (const TCollection_AsciiString &theTitle) |
Set window title. More... | |
bool | IsMapped () const |
Return true if window is displayed on the screen. More... | |
void | DisplayWindow () |
Display window on the screen. More... | |
void | Hide () |
Hide window. More... | |
void | Destroy () |
Destroy window. More... | |
void | Clear () |
Clear window content. More... | |
Standard_Boolean | GetUseBuffer () const |
Returns Standard_True if off-screen image buffer is being used. More... | |
void | SetUseBuffer (Standard_Boolean theToUse) |
void | SetColor (Standard_Integer theColor) |
Set active color index for further paintings. More... | |
void | SetMode (Standard_Integer theMode) |
Set active paint mode (3 for COPY; 6 for XOR). More... | |
void | DrawString (Standard_Integer theX, Standard_Integer theY, const char *theText) |
Draw the string. More... | |
void | DrawSegments (const Draw_XSegment *theSegments, Standard_Integer theNumberOfElements) |
Draw array of segments. More... | |
void | Redraw () |
Redraw window content. More... | |
Standard_Boolean | Save (const char *theFileName) const |
Save snapshot. More... | |
void | InitBuffer () |
(Re)initializes off-screen image buffer according to current window size. More... | |
view API | |
Standard_Integer | myId |
Initialize view by the type. More... | |
Draw_Viewer * | myViewer |
Initialize view by the type. More... | |
char | myType [5] |
Initialize view by the type. More... | |
Standard_Boolean | myIsPers |
Initialize view by the type. More... | |
Standard_Boolean | myIs2D |
Initialize view by the type. More... | |
Standard_Real | myFocalDistance |
Initialize view by the type. More... | |
Standard_Real | myZoom |
Initialize view by the type. More... | |
gp_Trsf | myMatrix |
Initialize view by the type. More... | |
Standard_Integer | myDx |
Initialize view by the type. More... | |
Standard_Integer | myDy |
Initialize view by the type. More... | |
Standard_Integer | myFrameX0 |
Initialize view by the type. More... | |
Standard_Integer | myFrameY0 |
Initialize view by the type. More... | |
Standard_Integer | myFrameX1 |
Initialize view by the type. More... | |
Standard_Integer | myFrameY1 |
Initialize view by the type. More... | |
Standard_Boolean | Init (const char *theType) |
Initialize view by the type. More... | |
void | Transform (const gp_Trsf &theTransformation) |
Transform view matrix. More... | |
void | ResetFrame () |
Resets frame of current view. More... | |
void | GetFrame (Standard_Integer &theX0, Standard_Integer &theY0, Standard_Integer &theX1, Standard_Integer &theY1) |
Returns parameters of frame corners. More... | |
virtual void | WExpose () override |
Perform window exposing. More... | |
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(). More... | |
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. More... | |
static void | RemoveCallbackBeforeTerminate (FCallbackBeforeTerminate theCB) |
Just in case method for un-registering a callback previously registered by AddCallbackBeforeTerminate(). More... | |
static Standard_Boolean | DefineColor (const Standard_Integer theIndex, const char *theColorName) |
static void | Flush () |
XFlush() wrapper (X11), has no effect on other platforms. More... | |
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. More... | |
void | init (const NCollection_Vec2< int > &theXY, const NCollection_Vec2< int > &theSize) |
Initialize the window. More... | |
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::Draw_View | ( | Standard_Integer | theId, |
Draw_Viewer * | theViewer, | ||
const char * | theTitle | ||
) |
Constructor.
Draw_View::~Draw_View | ( | ) |
Destructor.
|
inline |
Gets horizontal offset.
|
inline |
Gets vertical offset.
|
inline |
Gets focal distance.
void Draw_View::GetFrame | ( | Standard_Integer & | theX0, |
Standard_Integer & | theY0, | ||
Standard_Integer & | theX1, | ||
Standard_Integer & | theY1 | ||
) |
Returns parameters of frame corners.
|
inline |
Gets matrix of view.
|
inline |
Gets parameter of zoom.
Standard_Boolean Draw_View::Init | ( | const char * | theType | ) |
Initialize view by the type.
|
inline |
Returns true value if current view in 2D mode.
|
inline |
Returns true value if current view in perspective mode.
void Draw_View::ResetFrame | ( | ) |
Resets frame of current view.
|
inline |
Sets horizontal offset.
|
inline |
Sets vertical offset.
|
inline |
Sets focal distance.
|
inline |
Sets view matrix.
|
inline |
Sets parameter of zoom.
void Draw_View::Transform | ( | const gp_Trsf & | theTransformation | ) |
Transform view matrix.
|
inline |
Returns type of view.
|
overridevirtual |
Perform window exposing.
Implements Draw_Window.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.
|
protected |
Initialize view by the type.