0

次のコードが示すように、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);
        }
4

1 に答える 1

0

はい、分かりました

Microsoft.Xna.Framework.Rectangle rec = new Microsoft.Xna.Framework.Rectangle(0, 0, (int)ActualWidth, (int)ActualHeight);

spriteBatch.Draw(texture、rec、Microsoft.Xna.Framework.Color.White);

于 2012-07-24T07:27:38.867 に答える