picshow3.swf
FPP hotspot plugin for showing one or several images in a scalable window.
This is a variation of the picshow2 plugin - the main difference being that instead of the zooming
and panning supported by picshow2, this plugin sports a magnifying glass.
The magnifying power, the glass diameter, the thickness and color of the frame, are all attributes
that can be customized in the plugin XML file.
The following hotspot parameter is supported in the FPP xml file:
In plugin XML file, the following tags and attributes are supported:
In the plugin hotspot image attribute the following values are supported:
Example plugin external xml file:
NOTES: All tag names must be written in lower case, but attribute names are case independent (borderColor is equal to bordercolor). If you want your pictures to be loaded in advance, with no delay when you want to show them, then add them to the xml file. Otherwise, just write the url in the image="..." attribute, and it will be loaded on the fly and displayed. The plugin is monitoring the hotspot image="..." attribute for a command or a picture id. Setting this to a new picture id will make the plugin show the corresponding picture. If no picture with that id is found, the plugin will look for an already loaded picture with a matching url. And if that is not found, it will finally try to load a picture with that url. You can choose to specify both "width" and "height" attributes or only one of them. If you specify both, the image will be scaled to fit inside that "box". If you specify only "width", the plugin height will be calculated to keep image proportions, and vice versa. When a percentage value is used, the plugin will calculate the size at init and when the pano is resized. The staticX and staticY parameters are the same as in the FPP XML file. The reason for having them here is that you cannot specify a percentage value in FPP. The plugin will calculate a new value at init and every time your pano is resized and send it to FPP, which will then position the hotspot correctly. If the image has to be scaled up to fit the bounding box, no magnifying glass will be shown.
Version history:
| xmlfile | xmlFile=picshow32.xml | plugin control XML file |
In plugin XML file, the following tags and attributes are supported:
| In <picshow3> tag: | ||
| width | width="40%" | width in percent or pixels, default=200 |
| height | height="280" | height in percent or pixels, default=200 |
| staticX | staticX="6%" | horisontal offset from alignment point |
| in percent or pixels, default=0 | ||
| staticY | staticY="15" | vertical offset from alignment point |
| in percent or pixels, default=0 | ||
| borderColor | borderColor="#000000" | color of image border |
| borderWidth | borderWidth="2" | width of image border |
| In <magnifier> tag: | ||
| size | size="120" | magnifying glass diameter, default=150 |
| power | power="50" | magnifying power, default=100% (image scale = 1) |
| frameWidth | frameWidth=2 | frame thickness, default=4 |
| frameColor | frameColor="#000000" | frame color, default=#808080 (grey) |
| In <picture> tag: | ||
| id | id="P1" | picture id |
| url | url="images/pic1.jpg" | picture file url |
In the plugin hotspot image attribute the following values are supported:
| + | show next image |
| - | show previous image |
| any other value is interpreted as picture id - see below under NOTES | |
Example plugin external xml file:
<?xml version = '1.0'?> <picshow3 width="50%" height="50%" staticX="0" staticY="0" borderColor="#DDEE00" borderWidth="2" > <magnifier size="100" power="50%" frameWidth="2" frameColor="#000000" /> <picture id="P1" url="../picshow2/images/rose.jpg" /> <picture id="P2" url="../picshow2/images/pic1.jpg" /> </picshow3>
NOTES: All tag names must be written in lower case, but attribute names are case independent (borderColor is equal to bordercolor). If you want your pictures to be loaded in advance, with no delay when you want to show them, then add them to the xml file. Otherwise, just write the url in the image="..." attribute, and it will be loaded on the fly and displayed. The plugin is monitoring the hotspot image="..." attribute for a command or a picture id. Setting this to a new picture id will make the plugin show the corresponding picture. If no picture with that id is found, the plugin will look for an already loaded picture with a matching url. And if that is not found, it will finally try to load a picture with that url. You can choose to specify both "width" and "height" attributes or only one of them. If you specify both, the image will be scaled to fit inside that "box". If you specify only "width", the plugin height will be calculated to keep image proportions, and vice versa. When a percentage value is used, the plugin will calculate the size at init and when the pano is resized. The staticX and staticY parameters are the same as in the FPP XML file. The reason for having them here is that you cannot specify a percentage value in FPP. The plugin will calculate a new value at init and every time your pano is resized and send it to FPP, which will then position the hotspot correctly. If the image has to be scaled up to fit the bounding box, no magnifying glass will be shown.
Version history:
1.0.1:
Fixed bug where image size could be wrong at init.
Fixed bug where image size could be wrong at init.
