mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 01:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,43 @@
|
||||
package org.osmf.layout
|
||||
{
|
||||
import flash.geom.Point;
|
||||
|
||||
internal class ScaleModeUtils
|
||||
{
|
||||
|
||||
public function ScaleModeUtils()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function getScaledSize(param1:String, param2:Number, param3:Number, param4:Number, param5:Number) : Point
|
||||
{
|
||||
var _loc6_:Point = null;
|
||||
var _loc8_:Number = NaN;
|
||||
var _loc7_:Number = NaN;
|
||||
switch(param1)
|
||||
{
|
||||
case "zoom":
|
||||
case "letterbox":
|
||||
_loc8_ = param2 / param3;
|
||||
_loc7_ = (param4 || param2) / (param5 || param3);
|
||||
if(param1 == "zoom" && _loc7_ < _loc8_ || param1 == "letterbox" && _loc7_ > _loc8_)
|
||||
{
|
||||
_loc6_ = new Point(param2,param2 / _loc7_);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc6_ = new Point(param3 * _loc7_,param3);
|
||||
}
|
||||
break;
|
||||
case "stretch":
|
||||
_loc6_ = new Point(param2,param3);
|
||||
break;
|
||||
case "none":
|
||||
_loc6_ = new Point(param4 || param2,param5 || param3);
|
||||
}
|
||||
return _loc6_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user