Skip to content

Instantly share code, notes, and snippets.

@nowri
Created April 2, 2012 12:48
Show Gist options
  • Save nowri/2283212 to your computer and use it in GitHub Desktop.
Save nowri/2283212 to your computer and use it in GitHub Desktop.
BitmapDataトリミング用。矩形のより大きい比率からスケールを求める。
var _scaleX:Number = SRC_WIDTH/bmd.width;
var _scale:Number = (bmd.height*_scaleX>=SRC_HEIGHT)? _scaleX:SRC_HEIGHT/bmd.height;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment