SilverScreen Solid Modeler

resize_screen

resize_screen

Previous topic Next topic  

resize_screen

Previous topic Next topic JavaScript is required for the print function  

 

SilverPlusRect

SilverEngineRect

 

void resize_screen(int left, int right, int top, int bottom, BOOLEAN maintain_view);

 

int     left;           // An integer screen coordinate value

int     right;          // An integer screen coordinate value

int     top;            // An integer screen coordinate value

int     bottom;         // An integer screen coordinate value

BOOLEAN maintain_view;  // TRUE or FALSE

 

 




Synopsis

#include "silver.h"

 

The resize_screen function defines a new screen location for the CAD API.

 

 

Parameters

left is a horizontal pixel coordinate >= 0 and < device width, it is also < right

right is a horizontal pixel coordinate >= 0 and < device width, it is also > left

top is a vertical pixel coordinate >= 0 and < device height, it is also < bottom

bottom is a vertical pixel coordinate >= 0 and < device height, it is also > top

 

maintain_view is TRUE if the world-space window should be scaled to maintain the view, and FALSE if it is to retain the same dimensions (the drawing may distort).

 

 

Return Value

none

 

 

Remarks

resize_screen is called in response to the application window changing size. It is only available in the SilverPlus and SilverEngine platforms.

 

 

See Also

Screen dimensions

 

 

Example

The following code shows how resize_screen might be used in response to a Win32 WM_SIZE event. For a complete example, see the EngineShell sample in the SilverEngine sample directory:

 

C++ Code

 

 // OnSize - Handle main window resize event (WM_SIZE)

 

 static void OnSize(HWND hwnd, UINT flag, int cx, int cy)

 {

 if ( ! (cx && cy) )

    return;

 

 . . .

 

 resize_screen(0, cx-1, 0, cy-1, TRUE);

 

 ss_command("refresh all");

 }