C# 클래스 Paint.GraphicsDisplay

GraphicsDisplay class - defines the rectangles for the different images used in the app
상속: IGraphicsDisplay
파일 보기 프로젝트 열기: RandolphBurt/MonoGame-iOS-SimplePaint

공개 메소드들

메소드 설명
BeginRender ( ) : void

Begins the drawing process.

BeginRenderNonPremultiplied ( ) : void

Begins the drawing process - using NonPremultiplied as the color merging option

BeginRenderOpaque ( ) : void

Begins the drawing process - using opaque as the color merging option

DrawGraphic ( ImageType imageType, Rectangle paintRegion, Color color ) : void

Renders a specific image

EndRender ( ) : void

End the current rendering process

GraphicsDisplay ( Microsoft.Xna.Framework.Graphics.Texture2D graphicsTexture, SpriteBatch spriteBatch, bool highResolution ) : System

Initializes a new instance of the Paint.GraphicsDisplay class.

SourceRectangleFromImageType ( ImageType imageType ) : Rectangle

Calculates the area of the texturemap that we need to use for rendering a specific image

메소드 상세

BeginRender() 공개 메소드

Begins the drawing process.
public BeginRender ( ) : void
리턴 void

BeginRenderNonPremultiplied() 공개 메소드

Begins the drawing process - using NonPremultiplied as the color merging option
public BeginRenderNonPremultiplied ( ) : void
리턴 void

BeginRenderOpaque() 공개 메소드

Begins the drawing process - using opaque as the color merging option
public BeginRenderOpaque ( ) : void
리턴 void

DrawGraphic() 공개 메소드

Renders a specific image
public DrawGraphic ( ImageType imageType, Rectangle paintRegion, Color color ) : void
imageType ImageType Type of image we want to render
paintRegion Microsoft.Xna.Framework.Rectangle destination rectangle to render the graphic
color Color Colour to use for rendering the image
리턴 void

EndRender() 공개 메소드

End the current rendering process
public EndRender ( ) : void
리턴 void

GraphicsDisplay() 공개 메소드

Initializes a new instance of the Paint.GraphicsDisplay class.
public GraphicsDisplay ( Microsoft.Xna.Framework.Graphics.Texture2D graphicsTexture, SpriteBatch spriteBatch, bool highResolution ) : System
graphicsTexture Microsoft.Xna.Framework.Graphics.Texture2D The sprite map - all images we need to render
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch Low level rendering class
highResolution bool Is the iPad running in High resolution.
리턴 System

SourceRectangleFromImageType() 공개 메소드

Calculates the area of the texturemap that we need to use for rendering a specific image
public SourceRectangleFromImageType ( ImageType imageType ) : Rectangle
imageType ImageType Type of image we want to render
리턴 Microsoft.Xna.Framework.Rectangle