C# Class Knot3.Framework.Platform.ContentLoader

Datei anzeigen Open project: knot3/knot3-code

Public Methods

Method Description
CreateGradient ( GraphicsDevice graphicsDevice, Color color1, Color color2 ) : Microsoft.Xna.Framework.Graphics.Texture2D
CreateGradient ( GraphicsDevice graphicsDevice, Color topLeft, Color topRight, Color bottomLeft, Color bottomRight ) : Microsoft.Xna.Framework.Graphics.Texture2D
CreateGradient ( GraphicsDevice graphicsDevice, GradientColor coloring ) : Microsoft.Xna.Framework.Graphics.Texture2D
CreateTexture ( GraphicsDevice graphicsDevice, Color color ) : Microsoft.Xna.Framework.Graphics.Texture2D
CreateTexture ( GraphicsDevice graphicsDevice, int width, int height, Color color ) : Microsoft.Xna.Framework.Graphics.Texture2D
DrawColoredRectangle ( this spriteBatch, Color color, Rectangle bounds ) : void
DrawScaledString ( this spriteBatch, SpriteFont font, string text, Color color, ScreenPoint position, Vector2 scale ) : void
DrawStringInRectangle ( this spriteBatch, SpriteFont font, string text, Color color, Bounds bounds, HorizontalAlignment alignX, VerticalAlignment alignY ) : void
InvertTexture ( IScreen screen, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Microsoft.Xna.Framework.Graphics.Texture2D
LoadEffect ( this screen, string name ) : Effect
LoadFont ( this screen, string name ) : SpriteFont
LoadModel ( this screen, string name ) : Model
LoadTexture ( this screen, string name ) : Microsoft.Xna.Framework.Graphics.Texture2D
ScaleStringInRectangle ( this spriteBatch, SpriteFont font, string text, Color color, Rectangle bounds, HorizontalAlignment alignX, VerticalAlignment alignY ) : Vector2
TextPosition ( SpriteFont font, string text, Vector2 scale, Vector2 position, Vector2 size, HorizontalAlignment alignX, VerticalAlignment alignY ) : Vector2

Private Methods

Method Description
Hash ( ) : int
LoadModel ( Microsoft.Xna.Framework.Content.ContentManager content, IRenderEffect pp, string name ) : Model
LoadTextureFromContentPipeline ( IScreen screen, string name ) : Microsoft.Xna.Framework.Graphics.Texture2D
LoadTextureFromFile ( IScreen screen, string name ) : Microsoft.Xna.Framework.Graphics.Texture2D

Method Details

CreateGradient() public static method

public static CreateGradient ( GraphicsDevice graphicsDevice, Color color1, Color color2 ) : Microsoft.Xna.Framework.Graphics.Texture2D
graphicsDevice GraphicsDevice
color1 Color
color2 Color
return Microsoft.Xna.Framework.Graphics.Texture2D

CreateGradient() public static method

public static CreateGradient ( GraphicsDevice graphicsDevice, Color topLeft, Color topRight, Color bottomLeft, Color bottomRight ) : Microsoft.Xna.Framework.Graphics.Texture2D
graphicsDevice GraphicsDevice
topLeft Color
topRight Color
bottomLeft Color
bottomRight Color
return Microsoft.Xna.Framework.Graphics.Texture2D

CreateGradient() public static method

public static CreateGradient ( GraphicsDevice graphicsDevice, GradientColor coloring ) : Microsoft.Xna.Framework.Graphics.Texture2D
graphicsDevice GraphicsDevice
coloring Knot3.Framework.Models.GradientColor
return Microsoft.Xna.Framework.Graphics.Texture2D

CreateTexture() public static method

public static CreateTexture ( GraphicsDevice graphicsDevice, Color color ) : Microsoft.Xna.Framework.Graphics.Texture2D
graphicsDevice GraphicsDevice
color Color
return Microsoft.Xna.Framework.Graphics.Texture2D

CreateTexture() public static method

public static CreateTexture ( GraphicsDevice graphicsDevice, int width, int height, Color color ) : Microsoft.Xna.Framework.Graphics.Texture2D
graphicsDevice GraphicsDevice
width int
height int
color Color
return Microsoft.Xna.Framework.Graphics.Texture2D

DrawColoredRectangle() public static method

public static DrawColoredRectangle ( this spriteBatch, Color color, Rectangle bounds ) : void
spriteBatch this
color Color
bounds Microsoft.Xna.Framework.Rectangle
return void

DrawScaledString() public static method

public static DrawScaledString ( this spriteBatch, SpriteFont font, string text, Color color, ScreenPoint position, Vector2 scale ) : void
spriteBatch this
font Microsoft.Xna.Framework.Graphics.SpriteFont
text string
color Color
position ScreenPoint
scale Vector2
return void

DrawStringInRectangle() public static method

public static DrawStringInRectangle ( this spriteBatch, SpriteFont font, string text, Color color, Bounds bounds, HorizontalAlignment alignX, VerticalAlignment alignY ) : void
spriteBatch this
font Microsoft.Xna.Framework.Graphics.SpriteFont
text string
color Color
bounds Knot3.Framework.Math.Bounds
alignX HorizontalAlignment
alignY VerticalAlignment
return void

InvertTexture() public static method

public static InvertTexture ( IScreen screen, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Microsoft.Xna.Framework.Graphics.Texture2D
screen IScreen
texture Microsoft.Xna.Framework.Graphics.Texture2D
return Microsoft.Xna.Framework.Graphics.Texture2D

LoadEffect() public static method

public static LoadEffect ( this screen, string name ) : Effect
screen this
name string
return Microsoft.Xna.Framework.Graphics.Effect

LoadFont() public static method

public static LoadFont ( this screen, string name ) : SpriteFont
screen this
name string
return Microsoft.Xna.Framework.Graphics.SpriteFont

LoadModel() public static method

public static LoadModel ( this screen, string name ) : Model
screen this
name string
return Microsoft.Xna.Framework.Graphics.Model

LoadTexture() public static method

public static LoadTexture ( this screen, string name ) : Microsoft.Xna.Framework.Graphics.Texture2D
screen this
name string
return Microsoft.Xna.Framework.Graphics.Texture2D

ScaleStringInRectangle() public static method

public static ScaleStringInRectangle ( this spriteBatch, SpriteFont font, string text, Color color, Rectangle bounds, HorizontalAlignment alignX, VerticalAlignment alignY ) : Vector2
spriteBatch this
font Microsoft.Xna.Framework.Graphics.SpriteFont
text string
color Color
bounds Microsoft.Xna.Framework.Rectangle
alignX HorizontalAlignment
alignY VerticalAlignment
return Vector2

TextPosition() public static method

public static TextPosition ( SpriteFont font, string text, Vector2 scale, Vector2 position, Vector2 size, HorizontalAlignment alignX, VerticalAlignment alignY ) : Vector2
font Microsoft.Xna.Framework.Graphics.SpriteFont
text string
scale Vector2
position Vector2
size Vector2
alignX HorizontalAlignment
alignY VerticalAlignment
return Vector2