Polybench® Reference
Allows to display images from the project's image repository. The images displayed can be changed by Project Actions.

Picture Viewer

Overview

Use this object to display changing images. The image that is displayed can be changed by setting the name of an image in the Image Repository in the ImageName variable, by using a SET_PARAMETER action.

Properties

Find more information about changing properties here: link

ImageName
type: Known image name
The name of the image in the image repository.

This property uses the Image Repository. For more information about the use of images in a project, refer to link

Stretched
type: True or False
Set to true to have the image stretched to the size of the Picture Viewer, or false to have it zoomed to the largest possible size.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'

In Stretched mode, the aspect ratio (the original ratio between width and height) of the image is lost, because the image is scaled to the size of the Picture Viewer. If Stretched is false, the image is zoomed such that it best fits the Picture Viewer, keeping the aspect ration in tact.

BackgroundColor
type: Known color name
The background color of the picture viewer

This property uses the Color Repository. For more information about the use of colors in a project, refer to link

It is allowed to specify a (partly) transparent background color. However, this is less efficient as a non-transparent color. Transparancy would only make sense if the Stretched property is set to False, because then you may see the background of the Picture Viewer. Otherwise you should specify a non-transparent color.

Size
type: Size containing width and height
The size of the user interface of this object (width, height).


Coordinates
type: Coordinate
The location of the user interface of this object in (x,y) coordinates, relative to the object it is on top of.


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

ImageName
type: See description
The name of an image in the image repository that is displayed in the Picture Viewer.

Details

Note that the difference between a Static Image (link) object and a Picture Viewer object is that the Static Image should be used to display static images (for example a background, or a logo), and that the Picture Viewer can be used to display images that are changed during the running of the project.

You can use Project Actions to set the variable parameter ImageName of the Picture Viewer. The name of the image in ImageName should be available in the Image Repository (link).