Sie sind nicht angemeldet.

1

Montag, 5. April 2010, 23:23

percentage to fixed?

Hi!

Is there any function that converts percentage values of plugins to fixed value?

For example if you set the width of plugin as 100%.
How to get the size in pixels?

Regards
Greg

2

Mittwoch, 7. April 2010, 21:22

Hi,

sorry, there is no automatic way to get the pixelsize,

best regards,
Klaus

3

Mittwoch, 7. April 2010, 23:43

Hi!

For now I have made this kind of hard solution ;-)

I have put small plugin (named end_marker here) as child of this main plugin at the righttop position. Then if I want to know the size of the main plugin I make:

Quellcode

1
2
3
4
5
set(plugin[end_marker].x,0); 
plugin[end_marker].changeorigin(lefttop,lefttop); 
set(the_x2,get(plugin[end_marker].x)); 
plugin[end_marker].changeorigin(rightop,rightop); 
set(plugin[end_marker].x,0);


And the "the_x2" value is the size of parent plugin in pixels.


Regards
Grzegorz