You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, September 10th 2010, 1:38pm

Thumbbar - show big image with a white border

Hi all,



I am using Klaus' Thumbbar to show some images. Works great.

Now I would like to have a - lets say 15px white border around the big image. Can somebody help me with this please? What do I have to do?

Thanks

Kai

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Friday, September 10th 2010, 2:19pm

Hi Kai,

A possible code could be adding an effect to the image plugin... like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	<action name="thumbbar_showimage">
		thumbbar_hide_allimages();

		set(plugin[%1].zorder, 3);

		push(plugin[%1].width);
		push(plugin[%1].height);
		plugin[%1].resetsize();
		copy(plugin[%1].originalwidth, plugin[%1].width);
		copy(plugin[%1].originalheight, plugin[%1].height);
		pop(plugin[%1].height);
		pop(plugin[%1].width);

		set(imgwidth, get(plugin[%1].originalwidth));
		set(imgheight, get(plugin[%1].originalheight));

		set(maxwidth, get(stagewidth));
		sub(maxwidth, maxwidth, thumbbar_xborder);

		set(maxheight, get(stageheight));
		sub(maxheight, maxheight, thumbbar_yborder);

		if(imgwidth GT maxwidth,
		   mul(imgheight, imgheight, maxwidth);
		   div(imgheight, imgheight, imgwidth);
		   copy(imgwidth, maxwidth);
		  );

		if(imgheight GT maxheight,
		   mul(imgwidth, imgwidth, maxheight);
		   div(imgwidth, imgwidth, imgheight);
		   copy(imgheight, maxheight);
		  );

		tween(plugin[%1].width, get(imgwidth));
		tween(plugin[%1].height, get(imgheight));

		mul(tmp, thumbbar_border, 3);
		add(tmp, tmp, thumbbar_thumbwidth);

		plugin[%1].changeorigin(center,center);

		tween(plugin[%1].x, 0);
		tween(plugin[%1].y, 0);

		set(plugin[%1].effect, glow(0xFFFFFF,1,15,20); );
		set(plugin[%1].onclick, thumbbar_hideimage(%1) );
	</action>


	<action name="thumbbar_hideimage">
		plugin[%1].changeorigin(get(thumbbar_align),get(thumbbar_align));
		set(plugin[%1].effect, );

		set(plugin[%1].zorder, 2);

		tween(plugin[%1].width, get(thumbbar_thumbwidth));
		tween(plugin[%1].height, get(thumbbar_thumbheight));
		tween(plugin[%1].x, get(plugin[%1].thumbx));
		tween(plugin[%1].y, get(plugin[%1].thumby));

		set(plugin[%1].onclick, thumbbar_showimage(%1) );
	</action>

note lines 46 and 53....

Hope this help.

SAlut.

3

Friday, September 10th 2010, 3:28pm

Hi Michel,

thanks. This was exactly what I needed.

Have a great day:-)

Kai

Similar threads