formZ SDK | 4.0 Call Back Reference | Surface Style Representation

# fz_srep_cbak_data_icon_pview

Description

Surface Style Representation preview function for icon generation (Recommended). This function is called whenever a Surface Style needs to gerneate the preview icon for the palette. It is expected to create the preview rendering that shows the surface style rendered on a sample object. The preview scene is defined as a separate formZ project, whose index is passed in as the pview_windex parameter. All project settings are defined in such a way, that the plugin can render the scene using the view, surface styles, images size ... of that project. Note, that this is only the case, if the FZ_SREP_FLAG_PREVIEW_NO_WINDEX flag returned by the info callback is set to FALSE. Otherwise, the pview_windex, rmtl and srep_data arguments are the original project and surface style and it is the srep's responsibilty to create a meaningful preview.
If this function is not implemented, formZ will display the default preview rendering, that is also shown in the Simple tab.

Plugin Prototype

fzrt_error_td fz_srep_cbak_data_icon_pview(

fzrt_int | pview_windex,
fz_rmtl_ptr | rmtl,
void * | srep_data,
fzrt_int | res,
unsigned char * | image_buffer,
fzrt_boolean * | complete )

Parameters

pview_windex [Input]

index of the project window containing the preview scene

rmtl [Input]

surface style to which the srep belongs

srep_data [Input]

The Surface Style Representation data.

res [Input]

The horizontal and vertical resolution at which to render the preview.

image_buffer [Input]

The image buffer to be filled with the preview rendering. It is allocated by formZ and has exactly res * res * 3 bytes.

complete [Result]

Return TRUE, if the preview image was completed sucessfully. Return FALSE if the preview rendering was interrupted before completion.

Returns

Error codes

Availability

7.0.0.0

See Also

FZ_SREP_FLAG_PREVIEW_NO_WINDEX

Function Set

fz_srep_cbak_fset

Defined in

fz_srep_api.h