You are not logged in.

1

Monday, April 5th 2010, 11:23pm

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

Wednesday, April 7th 2010, 9:22pm

Hi,

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

best regards,
Klaus

3

Wednesday, April 7th 2010, 11:43pm

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:

Source code

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