5 using SiliconStudio.Core.Mathematics;
6 using SiliconStudio.Core.Serialization.Converters;
8 namespace SiliconStudio.
Paradox.Graphics
13 [
DataConverter(AutoGenerate =
true, ContentReference =
false)]
20 : this(Guid.NewGuid().ToString())
72 if (spriteBatch == null)
throw new ArgumentNullException(
"spriteBatch");
77 spriteBatch.Draw(
Texture, position, Region, color, rotation,
Center, scales, spriteEffects,
Orientation, depthLayer);
86 return (
Sprite)MemberwiseClone();
Represents a two dimensional mathematical vector.
void Draw(SpriteBatch spriteBatch, Vector2 position, float rotation=0, float depthLayer=0, SpriteEffects spriteEffects=SpriteEffects.None)
Draw a specific frame of the sprite with white color and scale of 1.
Base class for converters to/from a data type.
Sprite(string fragmentName)
Create a new instance of sprite.
SpriteEffects
Defines sprite mirroring options.
static readonly Vector2 One
A SiliconStudio.Core.Mathematics.Vector2 with all of its components set to one.
Sprite()
Creates a new instance of sprite with unique random name.
Represents a 32-bit color (4 bytes) in the form of RGBA (in byte order: R, G, B, A).
Sprite Clone()
Clone the current sprite.
void Draw(SpriteBatch spriteBatch, Vector2 position, Color color, Vector2 scales, float rotation=0f, float depthLayer=0, SpriteEffects spriteEffects=SpriteEffects.None)
Draw a specific frame of the sprite.
static readonly Color White
White color.
The text will be centered.
Vector2 Center
The position of the center of the image in pixels.
Android.Widget.Orientation Orientation
Renders a group of sprites.
A sprite represents a series frames in an atlas forming an animation.
Base class for texture resources.