Table of Contents

Class MonoGameAdapters

Namespace
Icy.MonoGame.Rendering
Assembly
IcyUI.MonoGame.dll

Represents extension methods to adapt MonoGame types to library interfaces.

public static class MonoGameAdapters
Inheritance
MonoGameAdapters
Inherited Members

Methods

Draw(SpriteBatch, Texture2D, in TextureRenderingOptions)

Performs texture drawing with specified rendering options using an instance of the Microsoft.Xna.Framework.Graphics.SpriteBatch class.

public static void Draw(this SpriteBatch spriteBatch, Texture2D texture, in TextureRenderingOptions options)

Parameters

spriteBatch SpriteBatch

An instance of the Microsoft.Xna.Framework.Graphics.SpriteBatch to draw texture with.

texture Texture2D

An instance of the Microsoft.Xna.Framework.Graphics.Texture2D to render.

options TextureRenderingOptions

Options for texture drawing.

Unwrap(ITexture)

Tries to unwrap an instance of the texture that has been wrapped using Wrap(Texture2D).

public static Texture2D Unwrap(this ITexture texture)

Parameters

texture ITexture

An instance of the ITexture that has been making by calling Wrap(Texture2D).

Returns

Texture2D

An instance of the Microsoft.Xna.Framework.Graphics.Texture2D that has been wrapped to create texture.

Exceptions

InvalidOperationException

Occurs when texture wasn't wrapped using Wrap(Texture2D) before.

Wrap(Texture2D)

Wraps an instance of the Microsoft.Xna.Framework.Graphics.Texture2D into ITexture interface for library usage.

public static ITexture Wrap(this Texture2D texture)

Parameters

texture Texture2D

An instance of the Microsoft.Xna.Framework.Graphics.Texture2D to wrap.

Returns

ITexture

An instance of the ITexture ready for work with the library.