formZ SDK | 5.0 API Reference | Project | Window Manager

# fz_wind_set_image_rect

Description

Sets the image rectangle for the project window. This is the area of the window that the image appears in and where all interactive input happens. This rectangle is in local screen coordinates relative to the upper left corner of the window. The image rect is always centered in the window, therefore the dimensions specified in the rect parameter are applied (i.e. width = rect->right - rect->left and height = rect->bottom - rect->top)
Note that settings in the Image Options dialog and View Parameters affect the ability to change the image rect. If use Use Custom Size is selected in the Image Options or the current view has the Camera View option enabled in the View Parameters dialog then the following rules apply:
1. The image rect can not be changed to be larger than the settings in the Image Options (Custom Size) or View Parameters (Camera View) settings. If a larger dimension is specified, the image rect is not expanded larger than the overriding dimension.
2. The image rect can not be changed to different proportions than the proportions specified in the Image Options (Custom Size) or View Parameters (Camera View) settings. If a different proportion is specified, the image rect is adjusted to match the overriding proportion.
3. If the dimensions are larger than the window, the window size will be increased.
4. If the dimensions are smaller than the window, the window size will not be decreased unless the Maximize Window In Screen option is selected in the Image Options.

Plugin Prototype

fzrt_error_td fz_wind_set_image_rect(

fzrt_int | windex,
fzrt_rect * | rect )

Parameters

windex [Input]

project window index

rect [Input]

image rectangle size

Returns

Error codes

Availability

5.0.0.0

Example Files

util_wind.fsl

See Also

Function Set

fz_wind_fset

Defined in

fz_wind_api.h