C# Class RedBadger.Xpf.Adapters.Xna.Graphics.SpriteBatchAdapter

Adapts an XNA SpriteBatch to an XPF ISpriteBatch.
Inheritance: ISpriteBatch
Mostra file Open project: redbadger/XPF Class Usage Examples

Public Methods

Method Description
Begin ( Rect clippingRect ) : void
Draw ( ITexture texture, Rect rect, RedBadger.Xpf.Media.Color color ) : void
DrawString ( ISpriteFont spriteFont, string text, RedBadger.Xpf.Point position, RedBadger.Xpf.Media.Color color ) : void
End ( ) : void
SpriteBatchAdapter ( SpriteBatch spriteBatch ) : Microsoft.Xna.Framework

Initializes a new instance of a SpriteBatchAdapter.

TryIntersectViewport ( Rect &clippingRect ) : bool

Method Details

Begin() public method

public Begin ( Rect clippingRect ) : void
clippingRect Rect
return void

Draw() public method

public Draw ( ITexture texture, Rect rect, RedBadger.Xpf.Media.Color color ) : void
texture ITexture
rect Rect
color RedBadger.Xpf.Media.Color
return void

DrawString() public method

public DrawString ( ISpriteFont spriteFont, string text, RedBadger.Xpf.Point position, RedBadger.Xpf.Media.Color color ) : void
spriteFont ISpriteFont
text string
position RedBadger.Xpf.Point
color RedBadger.Xpf.Media.Color
return void

End() public method

public End ( ) : void
return void

SpriteBatchAdapter() public method

Initializes a new instance of a SpriteBatchAdapter.
public SpriteBatchAdapter ( SpriteBatch spriteBatch ) : Microsoft.Xna.Framework
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The XNA SpriteBatch to adapt.
return Microsoft.Xna.Framework

TryIntersectViewport() public method

public TryIntersectViewport ( Rect &clippingRect ) : bool
clippingRect Rect
return bool