What can I say? I try this again today and now the

snapshotting works and my scale hack throws it out of wack.
Uhhh. I know I wasn't booching it and running out-of-synch code
together, because everything's in this class and I had loads
of trace logging in here when I was working with it on monday.
I wouldn't believe myself if I hadn't been there.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@466 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2008-04-16 21:31:24 +00:00
parent 4102fd95ee
commit bc469abcdf
2 changed files with 2 additions and 7 deletions
@@ -7,8 +7,6 @@ import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.media.Camera;
import flash.media.Video;
@@ -107,10 +105,7 @@ public class CameraSnapshotter extends Sprite
return; // throw exception?
}
// for some reason the video seems to always be locked at 160x120 when we try to
// draw it, so we do some scaling...
var matrix :Matrix = new Matrix(_camera.width / 160, 0, 0, _camera.height / 120);
_bitmap.bitmapData.draw(_video, matrix);
_bitmap.bitmapData.draw(_video);
if (_video.parent != null) {
removeChild(_video);
+1 -1
View File
@@ -47,7 +47,7 @@ public class MathUtil
*/
public static function normalizeRadians (radians :Number) :Number
{
var twopi :Number = Math.PI * 2;
const twopi :Number = Math.PI * 2;
var norm :Number = radians % twopi;
return (norm >= 0) ? norm : (norm + twopi);
}