C# Class Ypsilon.Extensions.GraphicsDeviceX

Class with extensionmethods for GraphicsDevice.
Afficher le fichier Open project: ZaneDubya/YCPU

Méthodes publiques

Méthode Description
PrepareScreenShot ( this device ) : void

Prepares for a screenshot by using a RenderTarget2D to write content to in Reach mode. This method should be called before your spriteBatch.Begin(), and the SaveScreenshot() method should be called after spriteBatch.End()

SaveScreenshot ( this device, string fileName = null ) : void

Create a screenshot of the current screen. You should call ScreenshotPrepare() before your spriteBatch.Begin(), and this method after spriteBatch.End();

Private Methods

Méthode Description
GetUnusedFileName ( ) : string
SaveScreenShotReach ( this device, string fileName = null ) : void
SaveScreenshotHiDef ( this device, string fileName = null ) : void
SaveTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, string fileName ) : void

Method Details

PrepareScreenShot() public static méthode

Prepares for a screenshot by using a RenderTarget2D to write content to in Reach mode. This method should be called before your spriteBatch.Begin(), and the SaveScreenshot() method should be called after spriteBatch.End()
public static PrepareScreenShot ( this device ) : void
device this The GraphicsDevice to use
Résultat void

SaveScreenshot() public static méthode

Create a screenshot of the current screen. You should call ScreenshotPrepare() before your spriteBatch.Begin(), and this method after spriteBatch.End();
public static SaveScreenshot ( this device, string fileName = null ) : void
device this The GraphicsDevice to use
fileName string The filename to save to. If fileName is null - a "ScreenShot_[number].png" format is used and the screenshot is saved to the game's running directory (where the EXE is)
Résultat void