Namespace MLEM.Graphics
Classes
- AutoTiling
This class contains a DrawAutoTile(SpriteBatch, Vector2, TextureRegion, ConnectsTo, Color, Vector2?, Vector2?, float) method that allows users to easily draw a tile with automatic connections, as well as a more complex DrawExtendedAutoTile(SpriteBatch, Vector2, TextureRegion, TextureRegion, ConnectsTo, Color, Color, Vector2?, Vector2?, float, float) method. Note that StaticSpriteBatch can also be used for drawing by using the AddAutoTile(StaticSpriteBatch, Vector2, TextureRegion, ConnectsTo, Color, Vector2?, Vector2?, float, ICollection<Item>) and AddExtendedAutoTile(StaticSpriteBatch, Vector2, TextureRegion, TextureRegion, ConnectsTo, Color, Color, Vector2?, Vector2?, float, float, ICollection<Item>) methods instead.
- ColorExtensions
A set of extensions for dealing with Microsoft.Xna.Framework.Color objects.
- ColorHelper
A set of utility methods for dealing with Microsoft.Xna.Framework.Color objects.
- GraphicsExtensions
A set of extensions for dealing with Microsoft.Xna.Framework.Graphics.GraphicsDevice and Microsoft.Xna.Framework.GraphicsDeviceManager
- SpriteBatchContextExtensions
A set of extensions for SpriteBatchContext.
- SpriteBatchExtensions
A set of extensions for dealing with Microsoft.Xna.Framework.Graphics.SpriteBatch
- StaticSpriteBatch
A static sprite batch is a highly optimized variation of Microsoft.Xna.Framework.Graphics.SpriteBatch that keeps all batched items in a Microsoft.Xna.Framework.Graphics.VertexBuffer, allowing for them to be drawn multiple times. To add items to a static sprite batch, use BeginBatch(SpriteSortMode?) to begin batching, ClearBatch() to clear currently batched items,
Add
and its various overloads to add batch items, Remove(Item) to remove them again, and EndBatch() to end batching. To draw the batched items, call Draw(BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Matrix?).
- StaticSpriteBatch.Item
A struct that represents an item added to a StaticSpriteBatch using
Add
or any of its overloads. An item returned after adding can be removed using Remove(Item).
Structs
- GraphicsExtensions.TargetContext
Represents a context in which a Microsoft.Xna.Framework.Graphics.RenderTarget2D is applied. This class should be used with WithRenderTarget(GraphicsDevice, RenderTarget2D).
- SpriteBatchContext
A sprite batch context is a set of information for a Microsoft.Xna.Framework.Graphics.SpriteBatch to use, which encapsulates all of the information usually passed directly to
SpriteBatch.Begin
. To use a sprite batch context effectively, the extension methods in SpriteBatchContextExtensions should be used.
Delegates
- AutoTiling.ConnectsTo
A delegate function that determines if a given offset position connects to an auto-tile location.