C# Класс Nez.Graphics

wrapper class that holds in instance of a Batcher and helpers so that it can be passed around and draw anything.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
batcher Batcher
bitmapFont BitmapFont
instance Graphics
pixelTexture Nez.Textures.Subtexture

Открытые методы

Метод Описание
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

Описание методов

Graphics() публичный Метод

public Graphics ( ) : System
Результат System

Graphics() публичный Метод

public Graphics ( BitmapFont font ) : System
font BitmapFont
Результат System

createSingleColorTexture() публичный статический Метод

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.
Результат Microsoft.Xna.Framework.Graphics.Texture2D

unload() публичный Метод

public unload ( ) : void
Результат void

Описание свойств

batcher публичное свойство

All 2D rendering is done through this Batcher instance
public Batcher,Nez batcher
Результат Batcher

bitmapFont публичное свойство

default font is loaded up and stored here for easy access. Nez uses it for the DebugConsole
public BitmapFont bitmapFont
Результат BitmapFont

instance публичное статическое свойство

public static Graphics,Nez instance
Результат Graphics

pixelTexture публичное свойство

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
Результат Nez.Textures.Subtexture