C# Class Paint.GraphicsDisplay

GraphicsDisplay class - defines the rectangles for the different images used in the app
Inheritance: IGraphicsDisplay
Afficher le fichier Open project: RandolphBurt/MonoGame-iOS-SimplePaint

Méthodes publiques

Méthode Description
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

Method Details

BeginRender() public méthode

Begins the drawing process.
public BeginRender ( ) : void
Résultat void

BeginRenderNonPremultiplied() public méthode

Begins the drawing process - using NonPremultiplied as the color merging option
public BeginRenderNonPremultiplied ( ) : void
Résultat void

BeginRenderOpaque() public méthode

Begins the drawing process - using opaque as the color merging option
public BeginRenderOpaque ( ) : void
Résultat void

DrawGraphic() public méthode

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
Résultat void

EndRender() public méthode

End the current rendering process
public EndRender ( ) : void
Résultat void

GraphicsDisplay() public méthode

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.
Résultat System

SourceRectangleFromImageType() public méthode

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
Résultat Microsoft.Xna.Framework.Rectangle