Camera 在XNA中显示全屏摄像机

Camera 在XNA中显示全屏摄像机,camera,windows-phone-7.1,fullscreen,xna-4.0,windows-phone,Camera,Windows Phone 7.1,Fullscreen,Xna 4.0,Windows Phone,总之,我想在带有XNA的Windows Phone中显示一个全屏摄像头(Microsoft.Devices.PhotoCamera),正如下面的代码所示,我试图更改screenpos和origin的值,但没有成功,我的代码出了什么问题?谢谢 if (CameraTexture != null) { Vector2 origin = new Vector2(CameraTexture.Width / 2, CameraTexture.Height / 2)

总之,我想在带有XNA的Windows Phone中显示一个全屏摄像头(Microsoft.Devices.PhotoCamera),正如下面的代码所示,我试图更改screenpos和origin的值,但没有成功,我的代码出了什么问题?谢谢

 if (CameraTexture != null)
        {
            Vector2 origin = new Vector2(CameraTexture.Width / 2, CameraTexture.Height / 2);
            Vector2 screenpos = new Vector2(240, 400);
            spriteBatch.Draw(CameraTexture, screenpos, null, Microsoft.Xna.Framework.Color.White, (float)Math.PI / 2,
           origin, 1.0f, SpriteEffects.None, 0f);
        }
好的,我知道了

Microsoft.Xna.Framework.Rectangle rec = new Microsoft.Xna.Framework.Rectangle(0, 0, (int)ActualWidth, (int)ActualHeight);
spriteBatch.Draw(纹理,rec,Microsoft.Xna.Framework.Color.White)