<TFT:Image Name='SampleImage'
Description
The Image control is used to render a bitmap image to the display.
Properties
File
Type/Value: A string of any length
Description:A valid path to the bitmap file. If the path points to an invalid folder or image file nothing will be rendered to the image area on the display.
Height
Type/Value: Unsigned integer. Value range 0–480.
Description:Defines the height of the image on the display. This must match the height of the bitmap file (in pixels) to get a proper rendering of the bitmap content on the display.
Location
Type/Value: String in format “X,Y” where X and Y are both unsigned integers. Value range for X is 0–640 and value range for Y is 0–480.
Description:The Location property specifies where the image shall be placed in relation to the parent control. If an image is defined in a panel the Location property will specify where inside the panel the image will be positioned. The physical location on the display will depend on where the panel is placed (panels also have a Location property) and where the image is placed.
Name
Type/Value: A string of any length
Description:The name of the Image control. Remember that Name must be unique within a panel.
Size
Type/Value: String in format “A,B” where A and B are both unsigned integers.
Value range for A is 0–640
Value range for B is 0–480.
Description:Defines both height and width of the image with one property.
Example: “640,480” sets width to 640 pixels and height to 480 pixels.
Width
Type/Value: Unsigned integer. Value range 0–640.
Description:Defines the width of the image on the display. This must match the width of the bitmap file (in pixels) to get a proper rendering of the bitmap content on the display.
Sub-elements
The Image control has a “Files” sub-element that can be used to select different images for different combinations of active pay units in the terminal. This allows the image content to change if a pay unit is set to partial error mode. The user interface can then be adapted to better describe the purchase process or available means of payment depending on which pay units that are active.
In the Files sub-element different FileItem sub-elements can be defined to specify different image files for different pay unit combinations. This functionality is only active for an image with the Name property set to “ActivePayUnitImage”. FileItem
If no match is found for an active pay unit combination, the bitmap set as "File" in the Image definition will be used as default.
Control information
ActivePayUnitImage is a key Name that can be used with the Image control to activate the possibility to display different bitmaps depending on which pay units that are active in the system.
AcceptPossibleImage is a key Name that can be used on a image to make it visible only when it is possible to accept the purchase. This can be used as instruction to the end user to display an image of what button to press for accept for instance. If the purchase cannot be accepted the AcceptNotPossibleImage will be displayed. If no AcceptNotPossibleImage is available or defined no image will be displayed.
<TFT:Image Name="AcceptPossibleImage" MxStyle="{AcceptPossibleImageStyle}"/>
<TFT:Image Name="AcceptNotPossibleImage" MxStyle="{AcceptNotPossibleImageStyle}"/>
Examples
The example image renders an image file with the name sampleimage.png stored in the folder “\Storage Card\Media\pictures\”. The Image control is given the name “SampleImage”, but in this case the name is not important.
<TFT:Image Name='SampleImage'
Location='183,340'
Size='275,150'
File='\Storage Card\Media\pictures\sampleimage.png'/>
Next example: The name of the image is “ActivePayUnitImage” to enable the function to display different bitmaps for different active pay unit combinations in the Image control.
The coin_card.png bitmap is displayed when both the coin and the card pay units are active (“Coin,Card” is the pay unit string). The coin.png bitmap is displayed when only the coin pay unit is active. The card.png bitmap is displayed when only the card pay unit is active. All bitmaps are stored in the folder “\Storage Card\Media\pictures\”.
<TFT:Image Name='ActivePayUnitImage'
Location='170,490'
Size='300,50'
File='\Storage Card\Media\pictures\default.png'>
<Files>
<TFT:FileItem PayUnits='Coin'
File='\Storage Card\Media\pictures\coin.png'/>
<TFT:FileItem PayUnits='Card'
File='\Storage Card\Media\pictures\card.png'/>
<TFT:FileItem PayUnits='Coin,Card'
File='\Storage Card\Media\pictures\coin_card.png'/>
</Files>
</TFT:Image>