Class SpriteNode
- Namespace
- Fantas
- Assembly
- Fantas.dll
Node that draws a Sprite
public class SpriteNode : Node
- Inheritance
-
SpriteNode
- Derived
- Inherited Members
- Extension Methods
Constructors
SpriteNode()
Creates an SpriteNode without Texture and empty size
public SpriteNode()
SpriteNode(SpriteNode)
Copy a SpriteNode
public SpriteNode(SpriteNode other)
Parameters
other
SpriteNode
SpriteNode(Texture)
Creates a SpriteNode with the given texture
public SpriteNode(Texture texture)
Parameters
texture
Texture
SpriteNode(Texture, SizeF)
Creates a SpriteNode with the given texture and size
public SpriteNode(Texture texture, SizeF size)
Parameters
SpriteNode(Color, SizeF)
Creates a SpriteNode from a Color
public SpriteNode(Color color, SizeF size)
Parameters
Properties
AnchorPoint
Reference anchor point for drawing and rotation
public PointF AnchorPoint { get; set; }
Property Value
BlendMode
Set the blend operation for the Sprite node
public BlendMode BlendMode { get; set; }
Property Value
BottomColor
Sprite tint Bottom Color
public Color BottomColor { get; set; }
Property Value
BottomLeftColor
Sprite tint BottomLeft Color
public Color BottomLeftColor { get; set; }
Property Value
BottomRightColor
Sprite tint BottomRight Color
public Color BottomRightColor { get; set; }
Property Value
CenterRect
Define the center rect used in 9-way scale operations
public RectangleF CenterRect { get; set; }
Property Value
Color
Sprite tint Color
public Color Color { get; set; }
Property Value
ColorBlendFactor
Color blend factor (0f-1f)
public float ColorBlendFactor { get; set; }
Property Value
Height
Height of SpriteNode
public float Height { get; set; }
Property Value
LeftColor
Sprite tint Left Color
public Color LeftColor { get; set; }
Property Value
RightColor
Sprite tint Right Color
public Color RightColor { get; set; }
Property Value
Size
Sprite node size
public SizeF Size { get; set; }
Property Value
Texture
SpriteNode current texture
public Texture Texture { get; set; }
Property Value
TopColor
Sprite tint TopColor
public Color TopColor { get; set; }
Property Value
TopLeftColor
Sprite tint TopLeft Color
public Color TopLeftColor { get; set; }
Property Value
TopRightColor
Sprite tint TopRight Color
public Color TopRightColor { get; set; }
Property Value
Width
Width of SpriteNode
public float Width { get; set; }
Property Value
Methods
Copy()
Copy this SpriteNode
protected override Node Copy()
Returns
ExpandHeight(float)
Increase the Height of SpriteNode
public void ExpandHeight(float delta)
Parameters
delta
float
ExpandWidth(float)
Increase the Width of SpriteNode
public void ExpandWidth(float delta)
Parameters
delta
float
Inflate(Vector2)
Increase the size of SpriteNode
public void Inflate(Vector2 delta)
Parameters
delta
Vector2
Inflate(float)
Increase the size of SpriteNode
public void Inflate(float delta)
Parameters
delta
float
Inflate(float, float)
Increase the size of SpriteNode
public void Inflate(float x, float y)
Parameters
OnSizeChanged()
Called when SpriteNode Size is explicitly change
protected virtual void OnSizeChanged()
ScaleTo(SizeF)
Scale the SpriteNode to a new size
public void ScaleTo(SizeF size)
Parameters
size
SizeF