Back to Adaptive Vision Library website

You are here: Start » Function Reference » Debug Preview » DebugPreviewShowRegion

DebugPreviewShowRegion


Header: AVL.h
Namespace: avl
Module: FoundationLite

Shows a region in a separated window. When called for the first time, creates a new window with size fitted to the region.

Applications: This function is for development purpose only and requires Library Professional license.

Syntax

bool avl::DebugPreviewShowRegion
(
	DebugPreviewWindowState& ioState,
	const Region& inRegion,
	const wchar_t* inWindowName,
	int inPosX,
	int inPosY
)

Parameters

Name Type Default Description
ioState DebugPreviewWindowState& Object used to maintain state of the function.
inRegion const Region& Region to preview.
inWindowName const wchar_t* "Region Preview" Name of newly opened window.
inPosX int Windows default X coordinate of initial windows position.
inPosY int Windows default Y coordinate of initial windows position.

Description

This function helps in debugging of Adaptive Vision Library based applications by providing a quick but primitive way to preview internal application image-oriented data in floating windows.

A preview window is bound to the state object specified in the first argument of the function. On the first call on specified state object instance, this function will create and show a new floating window with size fitted to the specified region. Every subsequent call on the same state object instance will only update the region in preview.

A preview window will be closed as a result of the following actions:

This function creates a background thread with message pump (single thread shared by all windows in the debug preview subsystem) that will stay active till application close (even when no more windows are active). To explicitly close the debug preview subsystem and free its resources call DebugPreviewCloseAllWindows function.

Leaving the start position set to its default value (-1x-1) will automatically arrange windows, starting from top left corner of the screen.

Return value

This function returns true after successful creation or update of an active window. After such window is closed by the user, subsequent calls to this function will return false.

See Also

  • DebugPreviewShowImage – Shows an image in a separated window. When called for the first time, it creates a new window with size fitted to the image.