C# 클래스 Ypsilon.Extensions.GraphicsDeviceX

Class with extensionmethods for GraphicsDevice.
파일 보기 프로젝트 열기: ZaneDubya/YCPU

공개 메소드들

메소드 설명
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();

비공개 메소드들

메소드 설명
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

메소드 상세

PrepareScreenShot() 공개 정적인 메소드

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
리턴 void

SaveScreenshot() 공개 정적인 메소드

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)
리턴 void