C# Class Nez.Graphics

wrapper class that holds in instance of a Batcher and helpers so that it can be passed around and draw anything.
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
batcher Batcher
bitmapFont BitmapFont
instance Graphics
pixelTexture Nez.Textures.Subtexture

Méthodes publiques

Méthode Description
Graphics ( ) : System
Graphics ( BitmapFont font ) : System
createSingleColorTexture ( int width, int height, Color color ) : Microsoft.Xna.Framework.Graphics.Texture2D

helper method that generates a single color texture of the given dimensions

unload ( ) : void

Method Details

Graphics() public méthode

public Graphics ( ) : System
Résultat System

Graphics() public méthode

public Graphics ( BitmapFont font ) : System
font BitmapFont
Résultat System

createSingleColorTexture() public static méthode

helper method that generates a single color texture of the given dimensions
public static createSingleColorTexture ( int width, int height, Color color ) : Microsoft.Xna.Framework.Graphics.Texture2D
width int Width.
height int Height.
color Color Color.
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

unload() public méthode

public unload ( ) : void
Résultat void

Property Details

batcher public_oe property

All 2D rendering is done through this Batcher instance
public Batcher,Nez batcher
Résultat Batcher

bitmapFont public_oe property

default font is loaded up and stored here for easy access. Nez uses it for the DebugConsole
public BitmapFont bitmapFont
Résultat BitmapFont

instance public_oe static_oe property

public static Graphics,Nez instance
Résultat Graphics

pixelTexture public_oe property

A subtexture used to draw rectangles, lines, circles, etc. Will be generated at startup, but you can replace this with a subtexture from your atlas to reduce texture swaps. Should be a 1x1 white pixel
public Subtexture,Nez.Textures pixelTexture
Résultat Nez.Textures.Subtexture