sf.service.ImageViewer
** This class will not be supported in 2015.
All functionalities of sf.service.ImageViewer class are more improved, integrating with CAPH. Therefore sf.service.ImageViewer class is not supported since 2015 Smart TV. To use functions of sf.service.ImageViewer class, refer to here.
This is the ImageViewer service API. Includes the ImageViewer and SlideShow service API.
Add the following line for sf.service.ImageViewer class into a html file your own : <script type="text/javascript" src="$MANAGER_WIDGET/Common/af/2.0.0/loader.js"></script> |
You can declare sf.service.ImageViewer class like this : ex) var imageViewer = sf.service.ImageViewer; |
Methods
clear | ||
Description | ||
This function clears the ImageViewer. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.clear(); |
draw | ||
Description | ||
This function draws the given image. | ||
Parameters | ■item - Object - Contains image information. * url: 'http://www.samsung.com/samsung.jpg' - image URL * width: '1920' : image width * height: '1080' : image height | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.draw(this.itemList[this.iItemIndex]); |
getZIndex | ||
Description | ||
This function returns the z-index of the ImageViewer. | ||
Parameters | none | |
Return | ■Number - the z-index of the ImageViewer | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.getZIndex(); |
hide | ||
Description | ||
This function hides the ImageViewer. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.hide(); |
setPosition | ||
Description | ||
This function sets the ImageViewer position to the specified area. | ||
Parameters | ■rect - Object - Position information. * left: 100, left-coordinate of ImageViewer area * top: 100, top-coordinate of ImageViewer area * width: 500, width of ImageViewer area * height: 400, height of ImageViewer area. ImageViewer takes 73px of the area base to show information panel | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.setPosition({ left: convCoord(700, 720), top: convCoord(100, 720), width: convCoord(500, 720), height: convCoord(400, 720), }); |
setZIndex | ||
Description | ||
This function sets the z-index of the ImageViewer. | ||
Parameters | ■zIndex - Number - z-index | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.setZIndex(50); |
show | ||
Description | ||
This function shows the ImageViewer. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.ImageViewer.show(); |