Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SpriteFrame.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 
4 using SiliconStudio.Core;
5 using SiliconStudio.Core.Mathematics;
6 
7 namespace SiliconStudio.Paradox.Graphics
8 {
9  /// <summary>
10  /// A sprite frame represents a single frame a sprite animation.
11  /// It contains the region of the texture representing the frame and the time it is supposed to be displayed.
12  /// </summary>
13  [DataContract]
14  public class SpriteFrame
15  {
16  /// <summary>
17  /// The rectangle specifying the region of the texture to use for that frame.
18  /// </summary>
20 
21  /// <summary>
22  /// The bias to the frame center in pixels.
23  /// </summary>
25 
26  /// <summary>
27  /// Clone the current sprite frame instance.
28  /// </summary>
29  /// <returns>A new instance of the current sprite frame.</returns>
30  public SpriteFrame Clone()
31  {
32  return (SpriteFrame)MemberwiseClone();
33  }
34  }
35 }
SpriteFrame Clone()
Clone the current sprite frame instance.
Definition: SpriteFrame.cs:30
Represents a two dimensional mathematical vector.
Definition: Vector2.cs:42
Rectangle TextureRegion
The rectangle specifying the region of the texture to use for that frame.
Definition: SpriteFrame.cs:19
Vector2 CenterBias
The bias to the frame center in pixels.
Definition: SpriteFrame.cs:24
Structure using the same layout than System.Drawing.Rectangle
Definition: Rectangle.cs:35
A sprite frame represents a single frame a sprite animation. It contains the region of the texture re...
Definition: SpriteFrame.cs:14