Hi,
the real pixelsize will not be calculated intermediately,
first all code will be executed and if some size/position parameter has changed then a flag for recalculation/redrawing was set,
and then with the next screen update/refresh the real size was calculated,
the original width/height variables will not be changed of course,
because if they would change the % will not work with the next resize of change,
and calculating the size intermediately would be bad from the performance perspective,
the size and position calculation is bigger part and respects many settings (e.g. when there is parent also the scaling from that one),
so I could provide the calculated pixel sizes, but only after the next screen refresh, which make it not very good usable in dynamic code...
btw - it it helps - providing the original pixelsize of the image as separate variables would be possible,
at the moment they could be get by calling "plugin[name].resetsize();",
e.g.
|
Quellcode
|
1
2
3
4
5
6
7
|
push(plugin[name].width);
push(plugin[name].height);
plugin[name].resetsize();
copy(plugin[name].originalwidth, plugin[name].width);
copy(plugin[name].originalheight, plugin[name].height);
pop(plugin[name].height);
pop(plugin[name].width);
|
best regards,
Klaus