30 if (me.size.x <= 0 || me.size.y <= 0)
return;
31 if (me.forcedAspect == 0)
33 me.imgOrigin =
'0 0 0';
39 if (me.forcedAspect < 0)
42 if (sz.x <= 0 || sz.y <= 0)
52 asp = me.forcedAspect;
55 if (me.forcedAspect <= -2)
57 me.imgSize_x = sz.x / me.size.x;
58 me.imgSize_y = sz.y / me.size.y;
59 if (me.zoomBox < 0 && (me.imgSize.x > 1 || me.imgSize.y > 1))
62 if (me.size.x > asp * me.size.y) me.zoomBox = (me.size.y * asp / me.size.x) / me.imgSize.x;
63 else me.zoomBox = (me.size.x / (asp * me.size.y)) / me.imgSize.y;
64 me.zoomFactor = me.zoomBox;
69 if (me.size.x > asp * me.size.y)
72 me.imgSize =
eY +
eX * (me.size.y * asp / me.size.x);
77 me.imgSize =
eX +
eY * (me.size.x / (asp * me.size.y));
86 me.zoomMax = me.zoomBox;
90 if (me.size.x > asp * me.size.y) me.zoomMax = (me.size.y * asp / me.size.x) / me.imgSize.x;
91 else me.zoomMax = (me.size.x / (asp * me.size.y)) / me.imgSize.y;
95 if (me.zoomMax > 0 && me.zoomFactor > me.zoomMax) me.zoomFactor = me.zoomMax;
96 if (me.zoomFactor) me.imgSize = me.imgSize * me.zoomFactor;
98 if (me.imgSize.x > 1 || me.imgSize.y > 1)
100 if (me.zoomSnapToTheBox)
102 if (me.imgSize.x > 1) me.zoomOffset_x =
bound(0.5 / me.imgSize.x, me.zoomOffset.x, 1 - 0.5 / me.imgSize.x);
103 else me.zoomOffset_x =
bound(1 - 0.5 / me.imgSize.x, me.zoomOffset.x, 0.5 / me.imgSize.x);
105 if (me.imgSize.y > 1) me.zoomOffset_y =
bound(0.5 / me.imgSize.y, me.zoomOffset.y, 1 - 0.5 / me.imgSize.y);
106 else me.zoomOffset_y =
bound(1 - 0.5 / me.imgSize.y, me.zoomOffset.y, 0.5 / me.imgSize.y);
110 me.zoomOffset_x =
bound(0, me.zoomOffset.x, 1);
111 me.zoomOffset_y =
bound(0, me.zoomOffset.y, 1);
116 me.zoomOffset =
'0.5 0.5 0';
119 me.imgOrigin_x = 0.5 - me.zoomOffset.x * me.imgSize.x;
120 me.imgOrigin_y = 0.5 - me.zoomOffset.y * me.imgSize.y;
vector(float skel, float bonenum) _skel_get_boneabs_hidden