Texture2D Members

The following tables list the members exposed by the Texture2D type.

Public Constructors

Name Description
Public Method Texture2D Overloaded. Creates an uninitialized Texture2D resource of the specified dimensions. To initialize a Texture2D from an existing file, see the static method ContentManager.Load.

Public Properties

Name Description
Public Property Bounds Gets the size of this resource.
Public Property Format (Inherited from Texture.)
Public Property GraphicsDevice (Inherited from GraphicsResource.)
Public Property Height Gets the height of this texture resource, in pixels.
Public Property IsDisposed (Inherited from GraphicsResource.)
Public Property LevelCount (Inherited from Texture.)
Public Property Name (Inherited from GraphicsResource.)
Public Property Tag (Inherited from GraphicsResource.)
Public Property Width Gets the width of this texture resource, in pixels.

Public Methods

Name Description
Public Method Dispose (Inherited from GraphicsResource.)
Public Method Equals (Inherited from Object.)
Public Method Static FromStream Overloaded. Methods for loading an image.
Public Method GetData Overloaded. Copies texture data into an array.
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method SaveAsJpeg Saves texture data as a .jpg.
Public Method SaveAsPng Saves texture data as a .png.
Public Method SetData Overloaded. Sets data to the texture.
Public Method ToString (Inherited from GraphicsResource.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from GraphicsResource.)
Protected Method MemberwiseClone (Inherited from Object.)

Public Events

Name Description
Public Event Disposing (Inherited from GraphicsResource.)

See Also

Reference

Texture2D Class
Microsoft.Xna.Framework.Graphics Namespace