Svaes the screen as an image. More...
Public Member Functions | |
| Screenshot () | |
| Creates an instance of the Screenshot class and initializes the save path. Creates the folder if not already there. | |
| void | TakeScreenshot (GraphicsDevice graphiceDevice) |
| Take a screenshot of the specified graphics device. | |
Svaes the screen as an image.
Definition at line 17 of file Screenshot.cs.
| NewGamePhysics.Utilities.Screenshot.Screenshot | ( | ) |
Creates an instance of the Screenshot class and initializes the save path. Creates the folder if not already there.
Definition at line 43 of file Screenshot.cs.
| void NewGamePhysics.Utilities.Screenshot.TakeScreenshot | ( | GraphicsDevice | graphiceDevice | ) |
Take a screenshot of the specified graphics device.
| device |
Definition at line 56 of file Screenshot.cs.
00057 { 00058 if (fileSaved.WaitOne(1000)) 00059 { 00060 fileSaved.Reset(); 00061 int w = graphiceDevice.PresentationParameters.BackBufferWidth; 00062 int h = graphiceDevice.PresentationParameters.BackBufferHeight; 00063 screenshotTexture = new ResolveTexture2D(graphiceDevice, w, h, 1, SurfaceFormat.Bgr32); 00064 graphiceDevice.ResolveBackBuffer(screenshotTexture); 00065 Thread newThread = new Thread(ScreenshotThread); 00066 newThread.Start(); 00067 } 00068 }
1.6.2