Table of Contents

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

texture Texture
size SizeF

SpriteNode(Color, SizeF)

Creates a SpriteNode from a Color

public SpriteNode(Color color, SizeF size)

Parameters

color Color

Color of Sprite

size SizeF

Properties

AnchorPoint

Reference anchor point for drawing and rotation

public PointF AnchorPoint { get; set; }

Property Value

PointF

BlendMode

Set the blend operation for the Sprite node

public BlendMode BlendMode { get; set; }

Property Value

BlendMode

BottomColor

Sprite tint Bottom Color

public Color BottomColor { get; set; }

Property Value

Color

BottomLeftColor

Sprite tint BottomLeft Color

public Color BottomLeftColor { get; set; }

Property Value

Color

BottomRightColor

Sprite tint BottomRight Color

public Color BottomRightColor { get; set; }

Property Value

Color

CenterRect

Define the center rect used in 9-way scale operations

public RectangleF CenterRect { get; set; }

Property Value

RectangleF

Color

Sprite tint Color

public Color Color { get; set; }

Property Value

Color

ColorBlendFactor

Color blend factor (0f-1f)

public float ColorBlendFactor { get; set; }

Property Value

float

Height

Height of SpriteNode

public float Height { get; set; }

Property Value

float

LeftColor

Sprite tint Left Color

public Color LeftColor { get; set; }

Property Value

Color

RightColor

Sprite tint Right Color

public Color RightColor { get; set; }

Property Value

Color

Size

Sprite node size

public SizeF Size { get; set; }

Property Value

SizeF

Texture

SpriteNode current texture

public Texture Texture { get; set; }

Property Value

Texture

TopColor

Sprite tint TopColor

public Color TopColor { get; set; }

Property Value

Color

TopLeftColor

Sprite tint TopLeft Color

public Color TopLeftColor { get; set; }

Property Value

Color

TopRightColor

Sprite tint TopRight Color

public Color TopRightColor { get; set; }

Property Value

Color

Width

Width of SpriteNode

public float Width { get; set; }

Property Value

float

Methods

Copy()

Copy this SpriteNode

protected override Node Copy()

Returns

Node

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

x float

delta added to width

y float

delta added to height

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