From bc469abcdf7f8af0df6cc14d5a84b08169bd8a32 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 16 Apr 2008 21:31:24 +0000 Subject: [PATCH] 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 --- src/as/com/threerings/flash/CameraSnapshotter.as | 7 +------ src/as/com/threerings/flash/MathUtil.as | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/as/com/threerings/flash/CameraSnapshotter.as b/src/as/com/threerings/flash/CameraSnapshotter.as index d64037b0..088f55ca 100644 --- a/src/as/com/threerings/flash/CameraSnapshotter.as +++ b/src/as/com/threerings/flash/CameraSnapshotter.as @@ -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); diff --git a/src/as/com/threerings/flash/MathUtil.as b/src/as/com/threerings/flash/MathUtil.as index 1fa0f0ce..ccee6781 100644 --- a/src/as/com/threerings/flash/MathUtil.as +++ b/src/as/com/threerings/flash/MathUtil.as @@ -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); }